PDA

View Full Version : Specular origin problem



Superfly_Jon
07-28-2003, 03:31 AM
I've got a scene with a moving object which is lit from a light which moves with the object.

The ligthing of the object is consistient when it moves, the specular highlights are not. The specular highlights are taken from the origin.

I've set:
glLightModeli(GL_LIGHT_MODEL_LOCAL_VIEWER, GL_TRUE);

Have I done something wrong or is this what I should expect?

Jon

harsman
07-28-2003, 04:42 AM
Specular lighting is view dependent, so what you're seing sounds correct. Try it yourself by moving something shiny and a flshlight in front of you. The shniy spot should move if you move your head, even if the light and the shiny object stays still.