varying vec3 vPosition;
varying vec3 vObjPos;
varying vec3 vNormal;
varying vec2 vTexCoord[4];

void main()
{
  gl_Position = ftransform();
  vPosition = (gl_ModelViewMatrix * gl_Vertex).xyz;
  vObjPos = vPosition;
  vObjPos.z -= gl_ModelViewMatrix[3][2];
  vNormal = gl_NormalMatrix * gl_Normal;
  vTexCoord[0] = gl_MultiTexCoord0.st;
  vTexCoord[1] = gl_MultiTexCoord1.st;
  vTexCoord[2] = gl_MultiTexCoord2.st;
  vTexCoord[3] = gl_MultiTexCoord3.st;
  gl_ClipVertex = gl_ModelViewMatrix * gl_Vertex;
}
