uniform mat4 modelview;
uniform mat4 projection;

varying vec4 pos3D;

varying vec3 light, normal, eye, v;
                   
void main()
{
  mat4 inv = inverse(modelview);

  light = (inv * vec4(10.0, 3.0, 8.0, 1.0)).xyz;
  
  normal = normalize(gl_NormalMatrix * gl_Normal);
  v = vec3(modelview * gl_Vertex);
  
  eye = vec3(inv * vec4(0.0, 0.0, 0.0, 1));
  //eye = (modelview * vec4(0.0, 0.0, 0.0, 1)).xyz;                          
    
  pos3D = projection * modelview * gl_Vertex; 
  gl_Position = pos3D;
  //gl_FrontColor = gl_Color;
}
