Sign in to follow this  
gedebook

[ask] need example Texture2DArray in hlsl

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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this