Sign in to follow this  
Clapfoot

Vertex texture fetch

Recommended Posts

Clapfoot    181
Hi, I was wondering what kind of experiences everyone has had with vertex texture fetch support on D3D. I've been using the tex2Dlod instruction for sampling in my vertex shader (pure HLSL/non-effect), but it keeps on returning 0. I'm trying to figure out if this is due to lack of hardware support, or if there is some kind of setup that i'm missing. I'm simply declaring a sampler2D in my vertex shader with no semantics, and setting a D3DFMT_A32B32G32R32F texture (i've also tried D3DFMT_R32F) to that sampler. Its documented in an NVIDIA paper that these texture formats are supporte on the 6800 so i'm assuming that the 7600 GT that i'm running should be ok. Any help or insight is appreciated. Thanks

Share this post


Link to post
Share on other sites
Clapfoot    181
No, i'm using whats returned by the constant table (via GetSamplerIndex) when compiling the shader. I'm assuming that the compiler will automatically bind any sampler declared in a vertex shader to the correct register. Do I have to somehow explicitly bind to a specific register?

Share this post


Link to post
Share on other sites
Clapfoot    181
I actually just tried setting the texture to sampler D3DVERTEXTEXTURESAMPLER0 and it worked! I guess the constant table interface doesn't account for vertex texture sampler registers correctly.

Thanks!!

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