OpenGL specular lighting is static

430 Views Asked by At

I am drawing 3d shapes in OpenGL. I am trying to add specular lighting to an object, but it doesn't seem to work. I have done ray tracing, so I know that specular lighting depends on the camera's position. In OpenGL, however, I have a static light spot. Example: enter image description here

The bright spot on the left of the arrow shaped object doesn't move, no matter where I view the object from. My light source is in line with the sphere and the arrow. It is a directional light. The shiny spot, however, doesn't move with the camera, it's completely static. It also doesn't appear on the other side of the arrow, where the light hits it from the same angle. Is this how it's supposed to work? How can I get it to move?

0

There are 0 best solutions below