Original Post
Hi there, I want to setup a light in such a way that it's intensity does not decay over distance. I'm using the following parameters now:
>> Light parameters (GL_LIGHT0):
Ambient = (0, 0, 0, 255)
Diffuse = (255, 255, 255, 255)
Specular = (255, 255, 255, 255)
Attenuation_constant = 1
Attenuation_linear = 0
Attenuation_quadratic = 0
>> Scene
Ambient = (0, 0, 0, 255)
I also used this call:
glColorMaterial(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE);
and I've set the color (glColor4ub) to (255, 255, 255, 255) before rendering.
I made this light and let it rotate around my model. The polygons of my model are either white or black (no gray's). This is weird because the angle between the light vector and the surface normal should cause the colors to slowly fade instead of flicker from black to white. My normals should be okay. I suspect something else is wrong.. Can someone help me? Thanks in advance. =)