<jittershader name="hdr.bloom.jxs">
	<param name="tex_color" type="int" default="0" />
	<param name="threshold" type="float" default="1.5" />
	<language name="glsl" version="1.2">
		<bind param="tex_color" program="fp" />
		<bind param="threshold" program="fp" />
		<program name="vp" type="vertex" source="sh.passthru.xform.vp.glsl" />
		<program name="fp" type="fragment">
<![CDATA[
#version 120
varying vec2 texcoord0;
uniform sampler2DRect tex_color;
uniform float threshold;

void main()
{
	vec4 color = texture2DRect(tex_color, texcoord0);
	//float luma = (color.r*0.2125) + (color.g*0.7154) + (color.b*0.0721);
	color.r = (color.r>threshold ? 1.0 : 0.0);
	color.g = (color.g>threshold ? 1.0 : 0.0);
	color.b = (color.b>threshold ? 1.0 : 0.0);
	
	gl_FragColor = color;
}
]]>		
		</program>		
	</language>
</jittershader>