Graphics Reference
In-Depth Information
6
Lighting
The simplest way to perform lighting is by computing it per-vertex, which
would place responsibility for most of the work squarely on the shoulders of
the vertex shader. If lighting is performed this way, the color is computed based
on light and material properties that determine the color of each vertex based
on the standard ambient-diffuse-specular ( ADS ) lighting model. This per-vertex
color can be used for either flat or smooth shading. However, if a more complex
shading model is to be used, such as Phong or anisotropic shading, the color
computation will probably be deferred until the fragment shader, where per-
pixel color can be computed.
In this chapter, we will discuss both per-vertex and per-fragment lighting
methods.
123
 
 
Search WWH ::




Custom Search