Jump to content

Is it possible to cache/copy/clone and compose render texture?


luknei
 Share

Recommended Posts

Hey I am building quite huge tile map from hexagons.
Basically for performance reasons I create single render texture and add a lot of sprites,and texts to it. It takes quite a lot of time to do so, but I get higher FPS and that texture is pretty much static. However there is another layer on top of this, which is dynamic, if I add another render texture to the game, FPS drops, so if I render everything to single texture FPS is still OK, however when dynamic part changes I need to rerendering whole texture and that takes too much time.
So I was thinking to generate  static texture  and cache/clone it in the memory, and compose with with dynamic texture, the composition would take a bit of time, but end result - single texture would let me keep stable FPS. So when dynamic texture changes I would need to only render dynamic texture and compose it with already cached static texture, but not sure is it possible at all?

Link to comment
Share on other sites

@samme thanks, it work. However getImage is so slow that it looses the the whole point of using it as performance optimization. Actually re-rendering everything from scrach is event faster than using getImage. Maybe you have any other ideas?

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...