varying float height, air;
varying vec2 TexCoord0, TexCoord1;
varying vec4 Clr;

uniform sampler2D DiffuseMap;
uniform vec4 Eng_WaterDeepColor;
uniform float Eng_WaterDeepVisibility;

void main()
{
	if (air > 0.0)
  		discard;
	else
		gl_FragColor = mix((Clr * texture2D(DiffuseMap, TexCoord0)), Eng_WaterDeepColor, min(Eng_WaterDeepVisibility, height) / Eng_WaterDeepVisibility);
}
