varying vec2 texCoord;

uniform sampler2D colorMap;
uniform vec4 glColor;



void main (void)
{




	
	vec4 limit=glColor;
	vec4 tex=texture2D(colorMap, texCoord);
	float r,g,b,a;
	
	r=min(tex.r,limit.r);
	g=min(tex.g,limit.g);
	b=min(tex.b,limit.b);
	a=min(tex.a,limit.a);
    
    gl_FragColor = vec4(r,g,b,a);

	
	
}
