uniform mat4 modelview;
uniform mat4 projection;

varying vec4 pos3D;

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

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