ABSTRACT
For example, any complex function c = f ( s , t) that returns a color from any two real parameters can be encoded into a two-dimensional texture map, assuming the error due to sampling, quantization, and interpolation can be tolerated. With a small additional amount of arithmetic (supported via compositing or fragment shader operations in practice), a small number of texture look-ups can often be combined into complete and surprisingly sophisticated lighting models. For instance, if a four-dimensional function g(s, t, u, v) can be decomposed into a product g1(s, t) · g2(u, v), only two two-dimensional texture lookups and a multiply are needed to evaluate it. We will use the term “texture shading” loosely to refer to any shader imple mentation technique that depends primarily, but not necessarily entirely, on values stored in textures rather than per-fragment arithmetic.