next up previous contents
Next: 23.2.6 Putting It All Up: 23.2 Lighting Equations Previous: 23.2.4 Diffuse Term

23.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: 23.2.6 Putting It All Up: 23.2 Lighting Equations Previous: 23.2.4 Diffuse Term
David Blythe
1999-08-06