next up previous contents
Next: C..2.6 Putting It All Up: C..2 Lighting Equations Previous: C..2.4 Diffuse Term   Contents

C..2.5 Specular Term

The specular term also depends on whether light falls directly on the vertex. If $\vec{l} \cdot \vec{n}$ is less than or equal to zero, there is no specular component at the vertex. (If it's less than zero, the light is on the wrong side of the surface.) If there's a specular component, it depends on the following:

Using these definitions, here's how OpenGL calculates the specular term:

\begin{displaymath}(\max \{s \cdot n, 0\})^{shininess} * \hbox{specular}_{light} * \hbox{specular}_{material}\end{displaymath}

However, if $\vec{l} \cdot \vec{n} = 0$, the specular term is $0$.


next up previous contents
Next: C..2.6 Putting It All Up: C..2 Lighting Equations Previous: C..2.4 Diffuse Term   Contents
2001-01-10