• Advertisement
Sign in to follow this  

Tangents for heightmap

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