Sign in to follow this  
luknei

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

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?

Share this post


Link to post
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?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.