I've been working on some deformable terrain code and I'm having trouble with the texture coordinates, I just can't wrap my head around this one.

Whatever I do the textures are stretched too much.

What would be the best way for texturing the terrain anyway? First I thought about using 3D textures, but the textures are quite difficult to manage as you should be able to have any texture blended with any other and I'd like to use the same textures for the terrain and for some objects too.

Then there's the GL_ARB_texture_env_combine, might have a go with this one too.

Now I'm trying to do the texturing just with the plain old multitexturing technique...

Any ideas?