i
i
i
i
i
i
i
i
172 7. The Rendering Pipeline
a texture to our scene, the values of s
R
, s
G
and s
B
need to be updated before
carrying out the lighting computations. We will now look in more detail
at the methods by which we can apply both procedural textures and image
maps.
7.6.1 Procedural Textures
Patterns on real-world objects are usually due to variations in geometry across
their surface (e.g., thorns, scales, bark etc.). Procedural textures are used to
re-create this variation for our computer-generated images. If a procedural
texture is applied to a fragment, the color value of that fragment is determined
using the relevant mathematical model, that is primarily a function of the
position of the fragment. By using this relatively simple technique, you can ...