Based on the shader (from steempipe) i found in this forum i did some modifications that i can blend 3 textures over the terrain using RGB colors of a mask texture. In addition the black color of the mask will contain a base texture and over the base texture the shader blends a detail map.
The shader is work in progress cause i am still learning about the programming but it is still useful in my own project.
There is some more detailed information on my website:
Description (Germain Only)
The sample project can be downloaded using this link:
Sample project As explained on the Website the shader only works on graphic devices supporting Shader Model 2 (e.g. Nvidia 6200) because it will blend the textures in one pass. Old shader model 1 supports only 4 blending textures in one pass.