The basic multitexturing terrain shader and painting tool are almost done.

Now you can have up to 32 textures/detail maps at the same time. Every single detail map can have it's own scale and shift factors.

The speed of the shader is really fast. It almost doesn't matter if you assign only 1 detail map or 32 detail maps. If further speed tests will be positive, I can add support for even more texture layers, for example 64 or more, but I'm not really if sure someone would really need that much terrain textures.

The next step is to add Normal Mapping and Specular Mapping support to the detail maps and make smooth blending available while painting.