Alright Chaps,
I’m having a bit of a problem with my specular light. It seems to only want to light up on the edge of the lit area.
I’m working with ARtoolkit with coordinates specified by a marker in augmented reality which makes it very difficult to pinpoint where the light is actually coming from. Because of this I can’t tell whether it’s the light position or the specular properties.
Some code specifying the light:
static void lighting1 (void)
{
GLfloat mat_flash[] = {0.0, 0.0, 1.0, 1.0};
GLfloat mat_flash_collide[] = {1.0, 0.0, 0.0, 1.0};
GLfloat mat_flash_shiny[] = {50.0};
GLfloat light_position[] = {-25.0, -25.0, 200.0, 0.0}; //{-25.0, -25.0, -75.0, 0.0};
GLfloat spec[] = {1.0, 1.0, 1.0, 1.0};
GLfloat lightZeroColor[] = {1.0, 1.0, 1.0, 1.0};
GLfloat direction[] = {-25, -25, 0};
glEnable(GL_LIGHTING);
glEnable(GL_LIGHT1);
glLightfv(GL_LIGHT1, GL_POSITION, light_position);
glLightfv(GL_LIGHT1, GL_SPECULAR , spec);
glLightfv(GL_LIGHT1, GL_DIFFUSE, lightZeroColor);
//glLightfv(GL_LIGHT1, GL_SPOT_DIRECTION, direction);
glMaterialfv(GL_FRONT, GL_SHININESS, mat_flash_shiny);
glEnable(GL_DEPTH_TEST);
}
Here’s a picture demonstrating my problem:
Thanks for your time