Sign in to follow this  
onnel

Texture blending between vertices

Recommended Posts

If I have three vertices used to render a triangle and different terrain types associated with each of them, how can I cause the triangle to be rendered with a blend of the three (I assume using some form of alpha blending to modify the strength of a given texture based on its distance from a vertex). Hopefully this question makes sense! Onnel

Share this post


Link to post
Share on other sites
Great article and example, thanks!

Any further thoughts on the issue he avoids: matching up between chunks?

Also, my original approach was only to draw triangles for a given texture if that texture was present. Is this worth the trouble? Is it quicker just to render the whole thing with the alpha map (which I would need anyway for the blending)?

Is there any way to do the blending dynamically on a triangle based on the terrain type of the three vertices (instead of using a predefined alpha map)?

Onnel

Share this post


Link to post
Share on other sites
This sounds like a job for vertex shaders. There's some good books on terrain rendering that will give examples of this, but I can't remember the names off the top of my head. I'll try to post tonight. In the mean time, google for terrain vertex shaders and maybe you'll find something useful.

Share this post


Link to post
Share on other sites

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