0

For a huge map I have to render many different Textures. Currently I am unsure about the best performance aproached to solve that problem. In my optinion there are two options. Render the whole tilemap (tile per tile) every draw cycle or create RenderTargets for a tile collection (render a specific amount of tiles into one texture) to reduce the tile amount.

I do know there is a 10MB RenderTarget cache limit and I also know that huge textures could leed to a performance issue. (VRAM limitations and texture swaping)

Is there a magic texture size which I should stick to? (Besides the hint: power of two)

Bin4ry
  • 652
  • 9
  • 34
  • well, you will have to decide what is best for you, test on different computers. my aproach is to create a one single texture layer of static objects (seamless grass) and then draw all other dynamic objects (rocks, trees). But also depend on game type... – Davor Mlinaric Mar 09 '16 at 08:19
  • Can you clarify this a bit: you are talking about rending the contents of the screen, or some off-screen map? How many tiles are you talking about? Do you need to render them programatically? If you are scrolling a simple tile map, having parts of the screen prerendered into textures will be very impractical. And keep in mind that you only need to send tile textures *once* to the gpu, while dynamic rendertargets need to be sent whenever they are changed. My knee-jerk suggestion would be to avoid optimization until you have a running application, profile it, and confirm the exact bottlenecks. – vgru Mar 09 '16 at 12:52

0 Answers0