Posted By: Ayumi
Render Detailmaps on Modelgroups - 02/26/13 12:00
Is it possible?
MATERIAL* mtl_detailmapping = { effect= " texture entSkin1; texture entSkin2; texture entSkin3; technique t0 { pass p0 { Texture[0] = <entSkin2>; Texture[1] = <entSkin1>; Texture[2] = <entSkin3>; // mix light map with dynamic lighting TexCoordIndex[0] = 1; ColorArg1[0] = Texture; ColorOp[0] = AddSigned; ColorArg2[0] = Diffuse; resultarg[0] = temp; // output to temp register colorarg1[1] = Texture; // color map colorop[1] = selectarg1; texcoordindex[1] = 0; colorarg1[2] = Texture; // detail map colorarg2[2] = current; // color map colorop[2] = addsigned; // add detail map to color map texcoordindex[2] = 0; texturetransformflags[2] = count2; texturetransform[2] = { 24.0,0.0,0.0,0.0, // detail map u scale 0.0,24.0,0.0,0.0, // detail map v scale 0.0,0.0,0.0,0.0, 0.0,0.0,0.0,0.0}; magfilter[2]=linear; minfilter[2]=linear; mipfilter[2]=linear; colorarg1[3] = temp; // (shadow map + vertex lighting) colorarg2[3] = current; // (color map + detail map) colorop[3] = modulate; // modulate (color map + detail map) with (shadow map + vertex lighting) magfilter[3] = linear; minfilter[3] = linear; mipfilter[3] = linear; } } "; }