next up previous contents
Next: 5.10 Environment Mapping Up: 5 Texture Mapping Previous: 5.8 Rendering Text

5.9 Projective Textures

Projective textures [44] use texture coordinates which are computed as the result of a projection. The result is that the texture image can be subjected to a separate independent projection from the viewing projection. This technique may be used to simulate effects such as slide projector or spotlight illumination, to generate shadows, and to reproject a photograph of an object back onto the geometry of the object. Several of these techniques are described in more detail in later sections of these notes.

OpenGL generalizes the two component texture coordinate (s,t) to a four component homogeneous texture coordinate (s,t,r,q). The q coordinate is analogous to the w component in the vertex coordinates. The r coordinate is used for three dimensional texturing in implementations that support that extension and is iterated in manner similar to s and t. The addition of the q coordinate adds very little extra work to the usual texture mapping process. Rather than iterating (s,t,r) and dividing by 1/w at each pixel, the division becomes a division by q/w. Thus, in implementations that perform perspective correction there is no extra rasterization burden associated with processing q.



David Blythe
Thu Jul 17 21:24:28 PDT 1997