uniform sampler2D base, second;

void main()
{
	float lum;
	vec4 b = texture2D(base, gl_TexCoord[0].st);
	vec4 a = texture2D(second, gl_TexCoord[1].st);

	lum = 1.0-(b.r + b.g + b.b)/3.0;
	gl_FragColor = vec4(lum*0.75, lum*0.75, lum*0.75, lum * a.a * gl_Color.a);
}
