Lighting Model
The OpenGL lighting model distinguishes between four types of light, one of which is internal:
The color at a vertex is computed as follows:

where
is the emissive RGB value of the current material
is the ambient RGB value of the lighting model,
i.e. it is not associated with a specific light source
is the light source constant attenuation coefficient
is the light source linear attenuation coefficient
is the light source quadratic attenuation coefficient
is the ambient RGB value of the light source
is the ambient RGB value of the material
is the unit vector from the vertex to the light source
is the surface normal vector
is the diffuse RGB value of the light source
is the diffuse RGB value of the material
is the sum
and the vector from the vertex and
the viewpoint
is the specular RGB value of the light source
is the specular RGB value of the material
On to the OpenGL lighting functions...
Back to shading...
Back to the 13.016 overview...