// Mikkel Gjøl, s971661 'at' student 'dot' dtu 'dot' dk
/////////////////////////////////////////

struct v2f {
	float4 position	: POSITION;
	float2 tex0		: TEXCOORD0;
	float2 tex1		: TEXCOORD1;
};


void main(	in const v2f IN,
			in uniform samplerRECT tex0 : TEXUNIT0,
			in uniform samplerRECT tex1 : TEXUNIT1,
			out float4 colOut : COLOR0 )
{

	const float4 col0 = texRECT( tex0, IN.tex0 );
	const float4 col1 = texRECT( tex1, IN.tex1 );

	colOut = col0 /(1-col1); // "color-dodge" - will not spill into black areas
	//colOut = img*img /(1-col1); //reflect
}
