uniform mat4 Eng_ObjectMatrix, Eng_ViewProjectionMatrix;
uniform float Eng_WaterMin;
uniform float Offset;

varying vec4 ViewCoords;
varying float height;
varying vec2 TexCoord;

void main()
{
	vec4 wvert = Eng_ObjectMatrix * gl_Vertex;

	TexCoord = gl_MultiTexCoord0.xy;

	wvert.z -= Offset;
	height = Eng_WaterMin - wvert.z;

 	gl_Position = Eng_ViewProjectionMatrix * wvert;
    ViewCoords = gl_Position;
}
