varying vec2 	texcoord;
varying vec2	VPOS;
varying vec4	WPOS;
uniform vec3 	corner;
uniform mat4	eyeToWorld;

attribute vec3	s2_vertex;
attribute vec4	s2_texcoords; 

void main()
{
	//gl_Position = ftransform();
	gl_Position=vec4(s2_vertex,1.0);
	texcoord = s2_texcoords.st;
	WPOS=vec4((s2_vertex.xyz*corner)/corner.z,0.0);
	VPOS=WPOS.xy;//(s2_vertex.xy*corner.xy)/corner.z;//gl_MultiTexCoord1.xy/gl_MultiTexCoord1.z;
	
	WPOS=eyeToWorld*WPOS;
}