next up previous
Next: Per-fragment Operations Up: Rasterization Previous: Primitive Decomposition

Texturing and Fog

Between scan conversion and processing of fragment operations, the fragment color can be modified by texturing and fog. Texturing maps a portion of a specified image (called a texture) onto each primitive for which texturing is enabled. The effect of texturing is analogous to being able to apply wall paper over a surface. Based on the fragment's texture coordinates, the associated texture sample (or texel value) within the texture is combined with the fragment's color based on the texture function. Textures can be either 1D or 2D, and there are a host of texturing modes available in OpenGL.

Texture mapping hardware tends to be expensive because texturing is a per-pixel operation and requires fast memory to store and retrieve the texture image. Texture mapping hardware is only now becoming available on mid-range to low-end workstations.

Then, fog (if enabled) blends the fragment's post-texturing color with the current fog color based on the eye-coordinate distance and fog mode. The post-fog fragment is then used to update the fragment's associated frame buffer pixel.



mjk@sgi.com