public override bool PreAddToRenderState( TargetRenderState targetRenderState, Pass srcPass, Pass dstPass )
{
TextureUnitState textureUnit;
//Create the mask texture unit.
textureUnit = dstPass.CreateTextureUnitState();
textureUnit.SetTextureName( this.maskMapTextureName );
this.maskMapSamplerIndex = dstPass.TextureUnitStatesCount - 1;
//Create the reflection texture unit.
textureUnit = dstPass.CreateTextureUnitState();
if ( this.reflectionMapType == TextureType.TwoD )
{
textureUnit.SetTextureName( this.reflectionMapTextureName );
}
else
{
textureUnit.SetCubicTextureName( this.reflectionMapTextureName, true );
}
this.reflectionMapSamplerIndex = dstPass.TextureUnitStatesCount - 1;
return true;
}