varying vec2	depth;

void main()
{
	vec4 vertex=gl_Vertex;
	vertex.xyz=normalize(gl_Vertex.xyz)*vec3(500000.0,50000.0,500000.0);//vec3(1000.0,1.0,1000.0) );
	//vertex.y-=500000.0;
	//vertex.xyz*=vec3(1.0,0.0001,1.0);
	vec4 projPosition = gl_ModelViewProjectionMatrix*vertex;
	depth=projPosition.zw;
	
	gl_Position = gl_ModelViewProjectionMatrix*gl_Vertex;
	/*prev = gl_ProjectionMatrix*prevMVM*gl_Vertex;
	curpos = gl_Position;*/
}