Original Post
Hey guys
I''m writing a game, but I''m having a problem with the lighting.
There''s a flat field, 200x200, enclosed by walls, with a light in one corner, (80,80), and it renders correctly on the walls that make up that corner, but it lights up the opposite walls fully as well, despite my best efforts to use light attenuation to stop this. Whatever numbers I use for the attenuation constant, linear attenuation and quadratic attenuation, the walls still shine with full intensity. This is the code i''m using (taken straight from the red book, but i''ve tried other numbers, from 100000 to 0.000001, for all three values.
glLightf(GL_LIGHT1, GL_CONSTANT_ATTENUATION, 2.0);
glLightf(GL_LIGHT1, GL_LINEAR_ATTENUATION, 1.0);
glLightf(GL_LIGHT1, GL_QUADRATIC_ATTENUATION, 0.5);
can someone please help me?
We scratch our eternal itch
A twentieth century bitch
We are grateful for
Our Iron Lung