OpenGL: Problem With Phong Model Specular Lighting

102 views Asked by At

I know that specular lighting is also based on the view direction. But I can't find what the default view direction is in old OpenGL function glLight(.. GL_SPECULAR..). How does it determine the direction of the view?

1

There are 1 answers

0
Sedfer On

In old OpenGL lighting is done in view space, where camera coordinates are (0, 0, 0), so view direction vector is equal to fragment's position.