I'm experiencing an odd problem where everything placed in front of my light appears black in my scene. This happens on multiple axes. I've searched the depths of the internet to find a solution, but I can't seem to find anything. It's also important to note that this is only happening to my models; the model's normals are fine and dandy. The rest of the scene renders as expected...
Here's how my light is initialized:
GLfloat light_ambient[] =
{ 0.2, 0.2, 0.2, 1.0 };
GLfloat light_diffuse[] =
{ 0.8, 0.8, 0.8, 1.0 };
GLfloat light_specular[] =
{ 1.0, 1.0, 1.0, 1.0 };
GLfloat light_position[] =
{ 15.0, 11.0, 10.0, 1.0 };
glLightfv(GL_LIGHT0, GL_AMBIENT, light_ambient);
glLightfv(GL_LIGHT0, GL_DIFFUSE, light_diffuse);
glLightfv(GL_LIGHT0, GL_SPECULAR, light_specular);
glLightfv(GL_LIGHT0, GL_POSITION, light_position);
glLightf(GL_LIGHT0, GL_CONSTANT_ATTENUATION, 0.4);
glLightf(GL_LIGHT0, GL_LINEAR_ATTENUATION, 0.1);
glLightf(GL_LIGHT0, GL_QUADRATIC_ATTENUATION, 0.0);
glEnable(GL_LIGHT0);
glEnable(GL_LIGHTING);
Here's how my light's position is set:
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluPerspective(60, (double)g_window1Width / g_window1Height, 1.0, 300.0);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glTranslated(0.0, 0.0, -player.camera.Dist);
glRotated(player.camera.Angle-90, 1.0, 0.0, 0.0);
glRotated(player.camera.Rot, 0.0, 0.0, 1.0);
glTranslated(-player.camera.TgtX, player.camera.TgtY, -player.camera.TgtZ);
glScaled(1.0, -1.0, 1.0);
glEnable(GL_POLYGON_OFFSET_LINE);
glPolygonOffset(g_offset[0], g_offset[1]);
glClearColor(0.0, 0.0, 0.0, 0.0);
glClearStencil(0);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
glm::vec4 light_position;
light_position.x = player.mouseMapPos.x - 1;
light_position.y = player.mouseMapPos.y - 1;
light_position.z = player.mouseMapPos.z + 0.5;
light_position.w = 1.0f;
glLightfv(GL_LIGHT0, GL_POSITION, glm::value_ptr(light_position));
I can supply more code and information as needed...