varying vec4 position;
varying vec3 normal;
varying float depthValue;
varying vec4 myColor;

varying float isTerrain;
varying vec3 glVertex;

void main()
{	
	gl_FrontColor = gl_Color;
	myColor = gl_FrontColor;

	//camera coordinate and depth value
	position = gl_ModelViewMatrix * gl_Vertex;
   glVertex = gl_Vertex.xyz;
	
	gl_Position = ftransform(); //= modelviewprojectionmatrix * gl_Vertex
	depthValue = gl_Position.z;
	normal = gl_NormalMatrix * gl_Normal;

	//"farbe"
	gl_TexCoord[0] = gl_MultiTexCoord0;

   isTerrain = gl_Color.r;
	//if (gl_Vertex.y < 0.0) gl_FrontColor = vec4(0.0, clamp(-gl_Vertex.y, 0.0, 1.0), 0.0, 1.0);
	//else gl_FrontColor = vec4(clamp(gl_Vertex.y, 0.0, 1.0), 0.0, gl_Vertex.y / 4.0, 1.0);	

	
}