attribute vec3  s2_vertex;
varying vec2	depth;

void main()
{
	vec4 vertex=vec4(s2_vertex,1.0);
	vertex.xyz=normalize(s2_vertex)*vec3(500000.0,50000.0,500000.0);
	vec4 projPosition = gl_ModelViewProjectionMatrix*vertex;
	depth=projPosition.zw;
	
	gl_Position = gl_ModelViewProjectionMatrix*vec4(s2_vertex,1.0);
}