Jump to content
  • Advertisement
Sign in to follow this  
shodanjr_gr

Normal Mapping and Displacement Mapping in a shader

This topic is 3757 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

I am working on a shader that displaces a surface based on some Perlin Noise (the noise is calculated on the GPU). I also use the noise to perturb a normal for each vertex on the surface. Of course in order to do lighting calculations i need to transform the light vector into tangent space. But i fail to see how i can calculate the new tangent space inside the shader...i dont have any connectivity information about each vertex and precalculating the tangent space on the CPU would be futile since i assume the displacement would make the old tanget vector invalid... Any ideas?

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by i_luv_cplusplus
try this http://www.ozone3d.net/tutorials/mesh_deformer.php


Thanks for the reply. I am aware of this tutorial, the thing is, i cant figure out WHY it works...(if it does). If i am reading it correctly, the guy used the old normal to produce a tangent and bitangent and then uses then to make a NEW normal, based on the Jacobian matrix...How does this work if the tangent and bitangent define the OLD tangent space?


[Edited by - shodanjr_gr on July 5, 2008 3:21:17 PM]

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!