Jump to content
  • Advertisement
Sign in to follow this  
Saranya

Help needed with HLSL

This topic is 3906 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, Is there any way to displace vertices (in a vertex shader) based on texture colors sampled at that point? Plz reply. Thanks, Saranya

Share this post


Link to post
Share on other sites
Advertisement
The term you're looking for is "vertex diplacement mapping". It requires SM3 hardware or above. If you don't have access to that, you could always do it in software.

Share this post


Link to post
Share on other sites
You need to be aware that only Nvidia supported vertex displacement mapping under Direct3D 9, ATI went their own route using "Render to Vertex Buffer" (R2VB).

hth
Jack

Share this post


Link to post
Share on other sites
tex2Dlod returns a vector, like all of the other texture functions. I've never used vertex textures in VS 3.0, but the documentation doesn't say anything about only retrieving a scalar value.

Share this post


Link to post
Share on other sites
Keep in mind that it only works on NVidia Geforce6 cards or better and on ATI Radeon 2000 cards and better. Other cards don't support it, even though ATI Radeon X1000 series were supposed to support it due to the specification of SM3.0.

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!