Sign in to follow this  

Tangents for heightmap

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

This topic is 3108 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this