varying vec3 eyePos;
varying vec4 projPos;
varying vec3 normal;
varying vec3 tangent;
varying vec3 binormal;
//varying vec3 taneye;
varying vec3 worldPos;
varying vec3 up;

void main()
{
  // world pos
  worldPos = gl_Vertex.xyz;

  // eye position
  eyePos = ( gl_ModelViewMatrix * gl_Vertex ).xyz;
  up = ( gl_ModelViewMatrix * vec4( 0.0, 1.0, 0.0, 1.0 ) ).xyz;
  
  // view projection
  gl_Position = ftransform();
  projPos = gl_Position;
  
  // texture coords
	gl_TexCoord[0] = gl_MultiTexCoord0;

  // normal
  normal = normalize( gl_NormalMatrix * gl_Normal );
  tangent  = normalize( gl_NormalMatrix * gl_MultiTexCoord1.xyz );
  binormal = normalize( gl_NormalMatrix * gl_MultiTexCoord2.xyz );
  // end t and b calc

}