Hello,
I have changed the code so you can adjust the value of the Reflection in Skill1 of the matieral:
Code:
material matFFPEnvMappingWS
{
// Skin zuweisen
skin1 = EnvMap;
// Effectcode
effect = "
// Textures
texture mtlSkin1;
texture entSkin1;
// Variables
DWORD mtlSkill1;
// Technique
technique EnvMapping01
{
pass pass01
{
// Setup textures
Texture[0] = <mtlSkin1>;
Texture[1] = <entSkin1>;
// Setup Texture Addressing
AddressU[0] = Clamp;
AddressV[0] = Clamp;
TextureFactor = <mtlSkill1>;
// Setup Textureblending
ColorArg1[0] = Texture;
ColorOp[0] = Modulate;
ColorArg2[0] = TFactor;
ColorOp[1] = Add;
ColorArg1[1] = Current;
ColorArg2[1] = Texture;
// How to use Texture coordinates
TexCoordIndex[0] = CameraSpaceReflectionVector;
TextureTransformFlags[0] = Count3;
}
}
technique fallback
{
pass p0
{
}
}
";
}
starter ConvertEnvMapToCubeMapWS
{
bmap_to_cubemap(matFFPEnvMappingWS.skin1);
matFFPEnvMappingWS.skill1 = pixel_for_vec(vector(30,30,30),100,8888);
}
I've not tested this code at all so I not gurantee that it works fine. Or that there are no errors.