Specular light is responsible for producing shininess on the surface of an object. Unlike diffuse light, which uses the incident ray and surface normal to find the intensity of light, specular light uses the reflected ray and the direction of the viewer to find the intensity of light.
The following figure illustrates the scenario in which the viewer's position (camera) is brought in to the picture to demonstrate the mathematical calculations for specular light. The angle made by the incident ray of light with the normal of the surface is always equal to an angle of reflection with the same normal. Therefore, both S and R vectors create a θ angle with N. The S vector is represented by the opposite direction (-S); this is because we are interested in calculating the R reflection vector:
This shininess is dependent on the angle made between the viewer and the reflected light; if the angle between the viewer's vector and the reflected...