Hello, I’m using cc.RenderTexture quite a lot in order to bake multiple sprites into one single texture.
The problem I’m facing at the moment is that cc.RenderTexture creates a texture that captures the whole screen, result being huge texture with a lot of empty space that I need to crop using
cc.Sprite.setTextureRect() . I’m experiencing performances issues, after too much RenderTexturing webgl crashes and I suspect it’s because of too much big textures.
I’m looking for a way to capture only a part of the screen (say 0, 0 to 450, 450) in order to generate smaller textures. Is that possible ? I tried to change the size when using
new cc.RenderTexture(width, height) but it still captures the whole screen and squeeze it into given dimensions.
Thanks for reading