Jump to content
  • Advertisement
Sign in to follow this  
maya18222

Tangents for heightmap

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

Im working on a water shader, that displaces the vertices of a plane in the vertex shader, via a few height maps running in different directions animated over time. But with the verices varying in height over time, the tangents are going to vary and need to be calculated each frame. But how can i do this if i dont have access to the other 2 vertices in the triangle?

Share this post


Link to post
Share on other sites
Advertisement
as you're animating the vertices probably in worldspace, tangentsspace is also in worldspace, so you can calculate the height for the vertex left/right/top/bottom of the current vertex, although that might rise the computatoin amount quite a lot.
depending on the formular you're using to calculate the height, you could calculate the tangentspace using the derivered formular.

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!