Jump to content
  • Advertisement
Sign in to follow this  
danromeo

XNA 4, Textures vs. Volume3d vs. TextureArray: Performance

This topic is 2541 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I just rewrote a shader that used volume textures (Texture3d) to use just normal textures instead and it looks like I took an enormous performance hit. I can't tell if it's because of the difference between Texture2d and Texture3d or if it's because I doubled the size of the textures.

I'm not up on all of the theory behind this and have read conflicting opinions. Can anybody tell me, are volume textures in general faster than normal textures? And how do Texture Arrays fit into this comparison?

Share this post


Link to post
Share on other sites
Advertisement
It's hard to say anything in general about the performance of volume textures...it depends on the size, the format, and how you use it (just like with 2D textures). If you ignore cache issues, then a bilinear fetch from a volume texture is mostly likely going to cost more than a fetch from a 2D texture since double the amount texels have to be fetched and filtered.

Texture arrays are just a group of identically-sized 2D textures. They're exactly like normal 2D textures, except that the shader can choose which array index it wants to sample. Naturally this can cause cache issues if nearby pixels sample from different array indices. However they're only available in SM4.0, so they're of no concern to you if you're using XNA.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!