
layout(location = 0, index = 0) out vec4 outcol;

uniform sampler2D tex_over;
uniform sampler2D tex_under;
uniform vec4 opasity; //note: over only

in vec2 texcoord_nm;

void main()
{

	vec4 col_over = texture( tex_over, texcoord_nm );
	vec4 col_under = texture( tex_under, texcoord_nm );

	float alpha = opasity.x;
	
	const float w = 2;
	vec2 a = mod( gl_FragCoord.xy, w );
	if ( a.x < w/2 || a.y < w/2 )
	{
		alpha *= 0.65;
	}

/*
	outcol = mix( col_under, col_over, col_over.a * alpha );
/*/
	outcol = col_over * alpha + col_under;
	/* */
}
