uniform sampler2D baseImage;

uniform vec3 colorPassThreshold;

void main(void) {
    vec4 sample = texture2D(baseImage, gl_TexCoord[0].st);

	if (sample.r > colorPassThreshold.r) sample.r = colorPassThreshold.r;
	if (sample.g > colorPassThreshold.g) sample.g = colorPassThreshold.g;
	if (sample.b > colorPassThreshold.b) sample.b = colorPassThreshold.b;

    gl_FragColor = sample;
}