I have a scene in which I have a polygonal model. It is lit with a single directional light source which moves with the viewpoint. I have GL_NORMALIZE enabled (it’s GL 1.1). For rotations/translations, this works fine, but when I zoom in, the scene gets progressively “flatter” until it appears as a grey mass with no lighting at all. Any suggestions as to the reason for this? I suspected the normals, but they appear to be fine (plus GL_NORMALIZE is on, so how could they go wrong??).
So then your problem is that opengl hw lighting is done per vertex. You need to either use per-pixel lighting in a pixel shader or subdivide the geometry.
Directional (infinite viewer type). Pixel shaders aren’t really an option - I have to support pretty old hardware. I’m not clear on how GL’s per vertex lighting combined with my ortho projection is causing this. I thought I had a decent grasp of the math - could you give a more technical explanation?
Sorry, i guess i was wrong, because the directional lighting doesnt take distance into account, only direction. Maybe this is an issue with the clipping and bad interpolation. I could use some pics.
I don’t think the direction of the light is the problem (although at this point I’m not ruling anything out!). If the light direction changed I would expect to be able to see that as I zoom in. Instead, I observe a continuous flattening of the surface as I get closer - the light position doesn’t appear to move, the lighting just gets crappier and crappier!!