Well, basically I created the mipmaps already in MED, when I was seting up the skins. But somehow they donīt show up. Maybe I missed something, but MED tells me, that all my skins have mipmaps.
I was looking into other multitexture code, and in one case, for example it is done like this:

bmap tex3 = <Landstrasse.tga>; // Texture Layer Red
bmap tex4 = <Fels.tga>; // Texture Layer Green
bmap tex5 = <FelsB.tga>; // Texture Layer Blue
bmap tex6 = <Grasboden.tga>; // Texture Layer Black


function multirgb_roughness() {
bmap_to_mipmap(mtl.Skin1);
bmap_to_mipmap(mtl.Skin2);
bmap_to_mipmap(mtl.Skin3);
bmap_to_mipmap(mtl.Skin4);

}


material multirgb {
flags = tangent;
skin1 = tex3;
skin2 = tex4;
skin3 = tex5;
skin4 = tex6;

event=multirgb_roughness; // here the mipmaps are created ...

effect
" //...

Maybe I can adapt this to the template code. The material from the templates however works a little bit different, since it uses internal skins from the terrain entity, so they should already be there? I like this shader, because it works so well with sun_color and lighting ...