varying vec2 texCoord;

uniform sampler2D originalMap;
uniform sampler2D mirrorMap;
uniform sampler2D maskMap;

void main (void)
{
	vec4 colororiginal=texture2D(originalMap, texCoord);
	vec4 colormirror=texture2D(mirrorMap, texCoord);
	float mask=texture2D(maskMap, texCoord).x;
	

	vec4 color = colororiginal*(1.0-mask)+colormirror*mask;

    gl_FragColor = color;
}
