March 2013
Intermediate to advanced
984 pages
26h 18m
English
It is easy to modify our shader so that it obtains the normal perturbation values from a texture rather than generating them procedurally. A texture that contains normal perturbation values for the purpose of bump mapping is called a bump map or a normal map.
An example of a normal map and the results applied to our simple box object are shown in Figure 8.10. Individual components for the normals can be in the range [–1, 1]. To be encoded into an RGB texture with 8 bits per component, they must be mapped into the range [0, 1]. The normal map appears chalk blue because the default perturbation vector of (0, 0, 1) is encoded in the normal map as (0.5, 0.5, 1.0). The normal map could be stored in a floating-point texture. Today’s graphics ...