PDA

View Full Version : only lighting the front of an object



jackhollow
10-30-2003, 08:04 AM
I have a spot light orbiting a sphere.
The problem is, the back of the sphere behind the light is being lit too. It happens on the demo posted here a while ago http://www.opengl.org/discussion_boards/ubb/Forum2/HTML/004796.html
Is there a way to stop this?

roffe
10-31-2003, 10:02 PM
If you draw a small sphere to simulate the shape and position of the light source, is it where you thought it would be?

jackhollow
11-03-2003, 01:32 AM
The light source is in the right place, and shinging in the correct direction; with a narrow beam, the front side of the sphere has a spot lit correctly, but it's as though the beam is continuing through the sphere to light the far side as well.
After experimentation, it seems that I have to set the lights ambient colour to zero to stop it.