#include Includes.txt

uniform sampler2D source0;
uniform sampler2D source1;
uniform float source0_opacity;
uniform float source1_opacity;
uniform vec2 position;
uniform vec2 scale;

void main() 
{
	vec2 TexCoord = 
		vec2(0.5, 0.5)
		+ ( ( gl_TexCoord[0].xy + vec2(-0.5, -0.5) ) * scale )
		+ position;
	gl_FragColor = screen(texture2D(source0, TexCoord) * vec4(source0_opacity), texture2D(source1, gl_TexCoord[0].xy) * vec4(source1_opacity));
}