//gl_ModelViewProjectionMatrix 
uniform int hmap;
uniform float interpc;

void main ()
{
	float interpn = interpc;
	float interp = 1.0 - interpn;
	float height;
	//interp = 1.0;
	//interpn = 0.0;

	if (hmap == 0)
	{
		height = (gl_Color.r * interp) + (gl_Color.g * interpn);
	}
	else if (hmap == 1)
	{
		height = (gl_Color.g * interp) + (gl_Color.b * interpn);
	}
	else if (hmap == 2)
	{
		height = (gl_Color.b * interp) + (gl_Color.a * interpn);
	}
	else if (hmap == 3)
	{
		height = (gl_Color.a * interp) + (gl_Color.r * interpn);
	}
	gl_TexCoord[0] = gl_MultiTexCoord0;
	gl_Position = gl_ModelViewProjectionMatrix * vec4(gl_Vertex.x, height + gl_Vertex.y, gl_Vertex.z, 1.0);
}