next up previous contents
Next: 23.2.5 Specular Term Up: 23.2 Lighting Equations Previous: 23.2.3 Ambient Term

23.2.4 Diffuse Term

The diffuse term needs to take into account whether light falls directly on the vertex, the diffuse color of the light, and the diffuse material property:

$(\max \{l \cdot n, 0\}) \ast \hbox{diffuse}_{light} \ast \hbox{diffuse}_{material}$

where:

l = (lx, ly, lz) is the unit vector that points from the vertex to the light position (GL_POSITION).
n = (nx, ny, nz) is the unit normal vector at the vertex.



David Blythe
1999-08-06