Really simple lighting question
I''ve been usually dealing with per-pixel lights, but you can''t afford putting them on everything with GeForce2, so here''s a simple question:
How do I make OpenGL do lighting before modelview matrix multiplication, e.g. take original world space coords I provide when calculating direction vector?
It really annoys me how lighting changes when camera is moved and that I can never predict where it''s going to be next second.
I''m not sure if this is ur problem, but (from what i understand from ur post) when u use
glLightfv(id, GL_POSITION, aPosition)
to specify the position of a light, it takes that position and mutiplies it by the top of the modelview stack. So make sure that you push your camera on to the stack before you set the positions of your lights.
glLightfv(id, GL_POSITION, aPosition)
to specify the position of a light, it takes that position and mutiplies it by the top of the modelview stack. So make sure that you push your camera on to the stack before you set the positions of your lights.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement