requested some times, so here we go with the brickdark-texture from the standard wad(sure you can replace it by your textures name):
Code:
bmap detailmap=<noise1.tga>; //use your detailmap
material brickdark { //replace by your textures name
skin1=detailmap;
effect="
matrix matMtl;
texture entSkin1;
texture entSkin2;
texture mtlSkin1;
technique sol_test {
pass p0 {
///////////////////////////////////////////standard a6 rendering
Texture[0]=<entSkin2>; //get the lightmap
ColorOp[0] = add;
ColorArg1[0] = texture;
ColorArg2[0] = diffuse;
Texture[1]=<entSkin1>; //get the level texture
ColorOp[1] = modulate2x;
ColorArg1[1] = texture;
ColorArg2[1] = current;
//AddressU[1] = mirror; // try mirrored texture
//AddressV[1] = mirror;
///////////////////////////////////////////detail map starts here
Texture[2]=<mtlSkin1>;
ColorOp[2] = modulate2x;
ColorArg1[2] = texture;
ColorArg2[2] = current;
TextureTransformFlags[2] = count3;
TextureTransform[2] = <matMtl>;
TexCoordIndex[2]=1;
}
}
";
}
in your main function place:
Code:
d3d_automaterial=1;
brickdark.matrix11=float(10); //replace by your textures name
brickdark.matrix22=float(10); //replace by your textures name
i dont know why it does not work on my pc setting the matrix inside a init-function using event in the material section, so i set the matrix in the main function...
hope i didnt any typos;-)
however, you have to define a material for every texture u want to apply a detail and dont forget that you can have as many detail-textures as you like. just use different bmaps.