#extension GL_ARB_texture_rectangle : enable

uniform sampler2DRect backFaces;
uniform sampler2DRect frontFaces;

vec4 getDiff(vec4 coords)
{
	vec4 back = texture2DRect(backFaces, coords.xy);
	vec4 front = texture2DRect(frontFaces, coords.xy);
	//die gerenderten Front-Faces oder Back-Faces zurückgeben
	//geplant war die Differenz, aber das hab i nit hinbekommen :(
	return front;
}

void main()
{
	vec4 diff = getDiff(gl_TexCoord[0]);
	gl_FragColor = diff;
}