Light position

I think I have a real blackout now.

In the Gerbera sample app I changed the light to always shine onto the cube from the same direction relative to the cube. i.e. always the same spot of the cube is lighted. So far so easy.

What I don’t get to work is to get the light stationary relative to the view! i.e. let it always shine onto the cube from the direction of the camera. Initializing the light at the beginning with negative Z doesn’t help, neither does putting it before the translation/rotation inside MODELVIEW modification.

Any suggestions where to put a “headlight” would be appreciated.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.