Im totally cofused it would be very nice if someone could explain me how it works
I converted it to lite-c no error at all
but when i use it only the texture of the car gets brighter nothing more frown
I really need you help!!!!!!
THanks for helping laugh
PS:WOuld be nice if someone could upload a working code in lite-c
with an example cube or something

Here is the shader iam using:
Code:
BMAP* bmp_envcube = "skycube1+6.tga";

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

function mtl_envmirror_view()
{
	mat_set(mtl.matrix, matViewInv);
	mtl.matrix41 = 0;
	mtl.matrix42 = 0;
	mtl.matrix43 = 0;
	mat_scale(mtl.matrix, 1, -1, 1);
}

function mtl_envmirror_init()
{
	bmap_to_cubemap(mtl.skin1);
	mtl.event = mtl_envmirror_view;
	set(my,ENABLE_VIEW);
}

MATERIAL* mtl_envmirror= // environment cube
{
	skin1 = bmp_envcube;
	event = mtl_envmirror_init;
	effect = "
	texture mtlSkin1;
	texture entSkin1;
	matrix matMtl;
	technique envcube
	{
		pass p0
		{
			AddressU[0] = Clamp; // don't wrap around edges
			AddressV[0] = Clamp;
			TexCoordIndex[0] = CameraSpaceReflectionVector;
			TextureTransformFlags[0] = Count3;
			TextureTransform[0] = <matMtl>; // transform camera space back to world space
			Texture[0] = <mtlSkin1>;
			ColorArg1[0] = Texture;
			ColorArg2[0] = Diffuse;
			ColorOp[0] = Modulate2x;
			Texture[1] = <entSkin1>;
			TextureFactor = 0xC0FFFFFF;
			ColorArg1[1] = Texture;
			ColorArg2[1] = Current;
			ColorOp[1] = BlendFactorAlpha; // blend by 75% (= oxC0)
		}
	}
	//technique fallback { pass p0 { } } // empty fallback causes normal rendering without effect
	";
}



WFG Progger

Last edited by Progger; 11/16/11 17:36.

asking is the best Way to get help laugh laugh laugh