Jump to content
  • Advertisement
Sign in to follow this  
Clapfoot

Vertex texture fetch

This topic is 3628 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, 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
Advertisement
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
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
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!