

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

uniform sampler2D tex_over;
uniform sampler2D tex_under;
uniform vec4 opasity;

//uniform vec4 time_s;

in vec2 texcoord_nm;

//note: [0;1]
float nrand( vec2 n ) {
	return fract(sin(dot(n.xy, vec2(12.9898, 78.233)))* 43758.5453);
}

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

	outcol = mix( vec4(1,1,1,1), col_over, opasity.x ) * col_under;

	//float nrnd = nrand( texcoord_nm + fract(0.1f * time_s.xx) );
}
