#version 130

varying vec2 vTexCoord;

// remember that you should draw a screen aligned quad
void main(void)
{
   //gl_Position = ftransform();;

   // Clean up inaccuracies
   vec2 Pos = sign(gl_Vertex.xy) * 2.0;

   Pos.x -= 1.0;
   Pos.y -= 1.0;

   gl_Position = vec4(Pos, 0.0, 1.0);
   // Image-space
   vTexCoord = vec2(Pos.x * 0.5 + 0.5, Pos.y * 0.5 + 0.5);
}
