Help needed with HLSL
Hi,
Is there any way to displace vertices (in a vertex shader) based on texture colors sampled at that point? Plz reply.
Thanks,
Saranya
You can using vertex textures, but they require VS 3.0 support. Not sure how you would do it with earlier shader models.
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.
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
hth
Jack
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.
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement