
float4 main(float4 Diffuse : COLOR0,      // Diffuse color
            float2 TexCoord0 : TEXCOORD0, // Texture 0 coordinates
            uniform sampler2D Tex0,       // Texture 0
            uniform float Factor)         // Blending facteur between the pixel and its opposite
: COLOR0
{
	float4 Pix = tex2D(Tex0, TexCoord0) * Diffuse;

	// Linear interpolation
	return lerp(Pix, 1 - Pix, Factor);
}
