
i
i
i
i
i
i
i
i
7.6. Texturing 177
3. Get the Euler angles that define the direction of d. These are the head-
ing
, which lies in the range [− , ], and pitch , which lies in the
range [
−
2
,
2
]. Scale the range of to cover the width X
max
of the
reflection image. Scale the range of to cover the height Y
max
of the
reflection image:
X =
(
+ )
2
X
max
;
Y =
(
2
− )
Y
max
.
4. Using bilinear interpolation, we may obtain a color value s from the
image in the vicinity of (X , Y ).
5. Mix s with the other sources contributing to the color seen at pixel
(i, j).
You can think of the reflection mapping process as one where the reflected
surface is located at the center of a hollow sphere with