Howdy. I have this shader, taken from the wiki, and modified a bit...
Code:
bmap bcube=<cube2+6.tga>;

function material_envmap_2_view() {
	mat_set(mtl.matrix,matViewInv);
 	mtl.matrix41=0;
 	mtl.matrix42=0;
 	mtl.matrix43=0;
}

function material_envmap_2_init() {
 	bmap_to_cubemap(mtl.skin1);
 	mtl.event=material_envmap_2_view;
 	mtl.enable_view=on;
}

material material_envmap_2 {
 	skin1=bcube;
 	event=material_envmap_2_init;

 	effect=
	 "
 		 texture entSkin1;
 		texture mtlSkin1;
 		matrix matMtl;
 		technique envmap
 		{
 			pass p0
 			{
 				texture[0]=<entSkin1>;
 				texture[1]=<mtlSkin1>;  

 				zWriteEnable=true;
 				alphaBlendEnable=false; 

 				colorArg1[0]=Texture;
 				colorOp[0]=Modulate2x;
 				colorArg2[0]=Diffuse;

 				colorArg1[1]=Texture;

				colorOp[1]=AddSmooth;	// Additive blending.

 				addressU[1]=Clamp;
 				addressV[1]=Clamp;
 				texCoordIndex[1]=cameraSpaceNormal;
 				textureTransformFlags[1]=Count3;
 				textureTransform[1]=<matMtl>;
 			}
 		}
 	";
}

I'm applying this to terrain, but wanted to include a skin2 detail texture. Can anyone point me in that direction?

Thanks much!


Dejobaan Games - Bringing you quality video games for over 75 years.