uniform sampler2D tex;
uniform float intensity;

void main(void) {    
	 vec4 original = texture2D(tex, floor(gl_TexCoord[0].st) / 1024.0);
	 float amt = (original.x / 2.0 + original.y / 2.0 + original.z / 2.0 + original.a / 4.0) * intensity;
	 gl_FragColor = vec4(1.0, 1.0, 1.0, min(1.0, amt));
}
