
Okay lets try this.
This is the original code. What needs to be done in order to make it use the entSkin1's alpha channel to control how strong the effect is where?
Code:
material mtl_envcube // environment cube
{
skin4 = bmp_envcube;
event = mtl_env_init;
effect = "
texture mtlSkin4;
texture entSkin2;
matrix matMtl;
technique envcube
{
pass p0
{
BumpEnvMat00[0] = 0.5f;
BumpEnvMat01[0] = 0.0f;
BumpEnvMat10[0] = 0.0f;
BumpEnvMat11[0] = 0.5f;
Texture[0] = <entSkin2>;
ColorArg1[0] = Texture;
ColorArg2[0] = Diffuse;
ColorOp[0] = BumpEnvMap;
// TextureFactor = 0xFFFF0000;
// ColorArg1[0] = Tfactor;
// ColorOp[0] = SelectArg1;
AddressU[1] = Clamp; // don't wrap around edges
AddressV[1] = Clamp;
TexCoordIndex[1] = CameraSpaceReflectionVector;
TextureTransformFlags[1] = Count3;
TextureTransform[1] = <matMtl>; // transform camera space back to world space
Texture[1] = <mtlSkin4>;
ColorArg1[1] = Texture;
ColorArg2[1] = Current;
ColorOp[1] = Add;
}
}
technique fallback { pass p0 { } } // empty fallback causes normal rendering without effect
";
}