<jittershader name="map">
	<description>
	charmap-style color lookup
	</description>
	
	<param name="invert" type="float" default="0.">
		<description>invert field dominance</description>
	</param>
	<param name="tex0" type="int" default="0" />
	<language name="glsl" version="1.0">
		<bind param="invert" program="fp" /> 
		<bind param="tex0" program="fp" />
		<program name="vp" type="vertex" source="sh.passthru.xform.vp.glsl" />
		<program name="fp" type="fragment">
<![CDATA[

//setup for 2 texture
varying vec2 texcoord0;
varying vec2 texcoord1;
uniform sampler2DRect tex0;
uniform sampler2DRect tex1;


uniform float invert;

void main()
{   

	vec4 a = texture2DRect(tex0, texcoord0);
	float point = floor(mod(texcoord0.y+invert,2.));
	vec2 p = vec2(0.,point);
	vec4 b = texture2DRect(tex0,texcoord0+p);
	vec4 c = texture2DRect(tex0,texcoord0-p);
	c = mix(b,c,0.5);
	c = mix(a,c,point);
	gl_FragColor = c;
}
]]>
		</program>
	</language>
</jittershader>
