uniform sampler2D textureId; 

uniform float colorizeRed;
uniform float colorizeGreen;
uniform float colorizeBlue;
uniform float colorizeAlpha;

void main (void)
{
	vec4 sum = vec4(0.0, 0.0, 0.0, 0.0);
	vec4 pixel = texture2D(textureId, gl_TexCoord[0].xy);
	
	if (pixel.a == 1.0) {
		pixel.r = colorizeRed;
		pixel.g = colorizeGreen;
		pixel.b = colorizeBlue;
		pixel.a = colorizeAlpha;
	}

	sum += pixel;
	gl_FragColor = sum;
}