   how to get camera coordinates in a GLSL
  Hi,All is in the question.[Edited by - TheSeb on September 24, 2006 1:30:38 PM]
  There are a few ways to do this probably (and I am not exactly sure if this is what you want), but in your vertex shader, gl_ModelViewMatrix transforms a vertex into camera coordinates (eye space).  So after multiplying gl_Vertex by gl_ModelViewMatrix, you then need to multiply by the inverse of the camera transform, which you will need to supply to the shader.;  there are no means to get the camera coordinates directly in the vertex or fragment shader ?   ;  Looks like the question changed since my last answer...What do you mean by camera coordinates?  The actual location of the camera?  If that is what you want, just pass it into the shader.  If you want the vertex in the camera coordinate system (or eye space or whatever you want to call it), then just mult. a vertex by gl_ModelViewMatrix...I thinks...   