uniform float waterLevel;
varying vec3 normal;
varying vec3 vertex;

varying vec3 glVertex;

void main()
{  
	vertex = vec3(gl_ModelViewMatrix * gl_Vertex);
	normal = normalize(gl_NormalMatrix * gl_Normal);
	
	gl_TexCoord[0] = gl_MultiTexCoord0;
	gl_Position = ftransform();
	
   glVertex = gl_Vertex.xyz;
	//if (glVertex.y < waterLevel + 0.2) gl_FrontColor = vec4(0.0, clamp(-glVertex.y / 2.0, 0.0, 1.0), 1.0, 1.0);
	//else gl_FrontColor = vec4(clamp(glVertex.y / 2.0, 0.0, 1.0), 1.0, glVertex.y / 8.0, 1.0);	

}
