The
reflectance model can be computed in the vertex or the fragment shader.
When
it is computed in the vertex shader, one is said to be implementing
per-vertex
lighting.
When
it is computed in the fragment shader, one is said to be implementing
per-fragment
lighting.
For
many scenes, there are fewer vertices than fragments to be processed. Therefore, per-vertex lighting is typically
faster.
However,
in per-vertex lighting, the lighting is only evaluated at the vertices and
interpolated along the primitive. In
this case, the tessellation of the surface affects the quality of the shading.