Game Development Reference
Figure 7.5. The angle between the normal vector N and the halfway vector H can also be
used to determine specular intensity.
Adding the contributions from n light sources, we can express the specular
component of our lighting formula as
H is the halfway vector for the i -th light source given by
7.5 Texture Mapping
One or more texture maps may be applied to a surface to achieve greater detail,
as shown in Figure 7.6. At each point on a surface, a texel (texture pixel) is
looked up in each texture map and combined in some way with the lighting for-
mula. In the simplest case, a sample from a diffuse texture map is looked up and
used to modulate the diffuse reflection color. More advanced applications are
discussed later in this chapter.
Search Nedrilad ::