varying vec2 texCoord;
uniform sampler2D colorMap;

/*
void main (void)
{
	gl_FragColor = texture2D(colorMap, texCoord);
}
*/

void main (void)
{
//vec2 nutexcoord;
vec4 pixelcolor;
	//nutexcoord=texCoord; nutexcoord.x=1.0-nutexcoord.x;
	pixelcolor = texture2D(colorMap, texCoord);
	
	if (pixelcolor.r+pixelcolor.g+pixelcolor.b>2.6f) {
		pixelcolor.r=0.5f;
		pixelcolor.g=0.5f;
		pixelcolor.b=1.0f;
		pixelcolor.a=1.0f;
		pixelcolor=vec4(1.0f,0.0f,0.0f,1.0f);
	}
	gl_FragColor = pixelcolor;

	//gl_FragColor = texture2D(colorMap, texCoord);
	//gl_FragColor = texture2D(colorMap, nutexcoord);
}
