const float offsetx = 1.0 / 1024.0;
const float offsety = 1.0 / 768.0;

void main()
{
  // set texture coords
  gl_TexCoord[0] = gl_MultiTexCoord0; // Color Map and normal map share coords
  gl_TexCoord[1] = gl_MultiTexCoord0; gl_TexCoord[1].x -= offsetx;// gl_TexCoord[1].y -= offsety;
  //gl_TexCoord[2] = gl_MultiTexCoord0;                              gl_TexCoord[2].y -= offsety;
  gl_TexCoord[2] = gl_MultiTexCoord0; gl_TexCoord[3].y += offsetx; //gl_TexCoord[3].y -= offsety;
  //gl_TexCoord[4] = gl_MultiTexCoord0; gl_TexCoord[4].x -= offsetx;
  //gl_TexCoord[5] = gl_MultiTexCoord0; gl_TexCoord[5].x += offsetx;
  gl_TexCoord[3] = gl_MultiTexCoord0; gl_TexCoord[6].y -= offsetx;// gl_TexCoord[6].y += offsety;
  //gl_TexCoord[7] = gl_MultiTexCoord0;                              gl_TexCoord[7].y += offsety;
  gl_TexCoord[4] = gl_MultiTexCoord0; gl_TexCoord[6].x += offsetx;// gl_TexCoord[6].y += offsety;
  //tex coord 8 calc'd in pixel shader to preserve ps2.0 compatability

  // transform position
  gl_Position = ftransform();
}
