varying vec2 TexCoord1;
varying vec2 TexCoord2;

uniform sampler2D WavesTex0;
uniform sampler2D WavesTex01;
uniform sampler2D WavesTex1;
uniform sampler2D WavesTex11;
uniform float t0, t1, b, bias, HeightMult;

void main()
{		
	float tex1 = mix(texture2D(WavesTex0, TexCoord1, bias).a, texture2D(WavesTex01, TexCoord1, bias).a, t0);
	float tex2 = mix(texture2D(WavesTex1, TexCoord2, bias).a, texture2D(WavesTex11, TexCoord2, bias).a, t1);
	
	gl_FragColor.r = mix(tex1, tex2, b) * HeightMult;
	gl_FragColor.g = 1.0;
	gl_FragColor.b = 1.0;
	gl_FragColor.a = 1.0;
}
