Jump to content
  • Advertisement
Sign in to follow this  
gedebook

[ask] need example Texture2DArray in hlsl

This topic is 3253 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

hi there. i'm still learning how to code on hlsl. I need to port from dx10 to dx9, seems it would be differ, dx9 doesn't support fixed array on Texture2D. How to access each array in Texture2DArray? Could you give me some code for it. thanks :)

Share this post


Link to post
Share on other sites
Advertisement
D3D9 has no concept of texture arrays.

In D3D10, you access the array members by using the (n+1)th texture coordinate component, where n is the dimensionality of a single array element. For example, in case of an array with 2d textures, xy is used for the 2d location as usual and z is the index of the 2d texture in the array.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!