varying vec2 		texcoord;
uniform sampler2D 	tex,
			glare,
			lum;
uniform float		scale;

void main()
{
	vec4 color0=texture2D(tex, texcoord);
	vec4 color2=texture2D(lum, texcoord);
	vec4 color1=texture2D(glare, texcoord)*scale;

	color1*=clamp((1.0-color2.x),0.0,1.0);

	gl_FragColor.xyz= color1.xyz + color0.xyz;// - (color1.xyz*color0.xyz);
}
