This chapter discussed several shaders that rely on information stored in texture maps. The programmability of OpenGL opens up all sorts of new uses for texture memory. In the first example, we used two typical color images as texture maps, and we also used one texture as an opacity map and another as a gloss map. In the second example, we accessed a cube map from within a shader. In the third example, we used a typical color image as a texture, but the shader accessed it in a unique manner. In the final example, we used one texture to store small images for rendering and another texture to store random numbers that added irregularity and interest to the final result.
In examples later in this book, you'll see how textures can be used to store normal maps, noise functions, and polynomial coefficients. There is really no end to the possibilities for creating unique effects with stored textures when your mind is free to think of texture memory as storage for things other than color images.