next up previous contents
Next: C..2.5 Specular Term Up: C..2 Lighting Equations Previous: C..2.3 Ambient Term   Contents

C..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}$


$l = (l_{x}, l_{y}, l_{z})$ is the unit vector that points from the vertex to the light position (GL_ POSITION).
$n = (n_{x}, n_{y}, n_{z})$ is the unit normal vector at the vertex.