I am just playing around with texturing terrains using GLSL. Does anyone know of any good examples on this topic. So far I am using two textures that blend according to the elevation, and I am also trying to apply detail textures. I am passing the dimension of the terrain to the shader, and it turns out that I can actually compute the main texture coordinates in the shader. I cannot see a way of computing the detail texture coords, because I don’t think that I can get information about neighboring vertices.
Basically I want to create a nice terrain with snow on the mountains and grass in the valleys. It seem that this should be computed in the shaders but I am still pondering on how this could be done. There isn’t much discussion about this topic in this blog, or anywhere else I looked. So I figured it might be a good idea to
start a thread …
Also, I have seen how morphing is done in shaders. Has anyone ever tried to make little grass shapes appear on the terrain according to
the distance to the viewer ?