Render to Texture Array or Texture Atlas?

Started by
3 comments, last by IvicaKolic 12 years, 8 months ago
I'm going to render a scene from 4 different angles, depths only. Would it be better to render to a texture array, or to render to different parts of the same texture to create an atlas?
Advertisement

I'm going to render a scene from 4 different angles, depths only. Would it be better to render to a texture array, or to render to different parts of the same texture to create an atlas?


Older hardware doesn't support texture arrays, but if thats a non issue then use them.
If you are using texture arrays, then you can also use geometry shaders to have the 1 draw call distribute into each of the rendertargets with a different camera matrix simultaneously.
A while back I did some tests with cascaded shadow maps on my old 5830, and it was faster to use an atlas. Couldn't tell you if the situation is the same on other hardware.
Yeah as I've thought about it it seems like atlas would be faster, since a texture array is still going to have to swap between multiple textures. However, the atlas is only really feasible if I want something like 4 renders. Anything more and I'd probably be better suited to a texture array.
Don't forget to add bias when rendering into atlas (use slightly higher FOV for projection matrices).
Also, if you want to render everything in a single pass (like Digitalfragment suggested- so that you don't need 4 passes) you can use instancing if geometry shaders are not desired (DX9 limitation).

This topic is closed to new replies.

Advertisement