<jittershader name="Negation">
	<description>
	Negation composite operator
	</description>
	<param name="amount" type="vec4" default="1. 1. 1. 1.">
		<description>Blend amount</description>
	</param>
	<param name="tex0" type="int" default="0" />
	<param name="tex1" type="int" default="1" />	
	<language name="glsl" version="1.0">
		<bind param="amount" program="fp" />
		<bind param="tex0" program="fp" />
		<bind param="tex1" program="fp" />	
		<program name="vp" type="vertex" source="sh.passthru.xform.vp.glsl" />
		<program name="fp" type="fragment">
<![CDATA[

// texcoords
varying vec2 texcoord0;
varying vec2 texcoord1;

// samplers
uniform sampler2DRect tex0;
uniform sampler2DRect tex1;

// blend amount
uniform vec4 amount;

// entry point
void main()
{   
	vec4 one = vec4(1.0);

	vec4 a = texture2DRect(tex0, texcoord0);
	vec4 b = texture2DRect(tex1, texcoord1);

	vec4 result = one - abs(one - a - b);
	gl_FragColor = mix(a,result,amount);
}

]]>
		</program>
	</language>
</jittershader>
