Sunday, 25 August 2013

Connecting smoothly N textures on terrain

Connecting smoothly N textures on terrain

I started to create my own terrain in a quite common way, just like this:
http://www.rastertek.com/tertut18.html . It is infinite and automatically
generated (by using coherent noise). The areas are determined by using
Voronoi noise
(http://www.ctvisualeffects.com/renderman/maya_pattern_animation/cellnoise.jpg=.
I am using triangle list with shared vertices. I'd like to create areas
textured differently that are connected smoothly with each other. I came
up with something like giving every vertex the texture id, e.g.:
0 - grass
1 - snow
2 - sand

I was thinking about sending the texture ids (the 0, 1, 2) to the shader
in the TEXCOORD semantic (the z value), however I have no further idea on
how to use them there to actually blend the textures smoothly.
Could you give me any hints, please? I'd be really grateful.

No comments:

Post a Comment