Specular
reflection is a
reflection of light off a surface. It
produces highlights, which can be observed on any shiny surface. Below, notice the white light reflecting off
the apple.
Specular
reflection depends on the viewer position.
When looking at an apple, If you move your head, you’ll notice the
specular highlight moves as well.
In
computer graphics,
shininess is
used to control the size of the highlight.
Shinier objects have smaller highlights.
A
reflection of
s
about
n
produces the refection vector
r. In the Phong model, the specular reflection
is determined from the angle between
r and
v.
This is also conveniently expressed as a dot product with normalised
vectors.

A
light’s specular component
ls is
reflected by a surface. The amount of
light reflection at each vertex is based on the reflection vector
r, the
viewing vector to the camera
v, and the surface
specular
material, ms.
The
colour resulting from the specular reflection is:

where n is the
shininess.

Some
programmers only compute the specular term for points where
s · n > 0.