Real-Time Shading

Procedural shaders combine a variety of local illumination and texture values to compute the color and opacity values that indicate the appearance of a surface. While in many cases, these shading procedures can be quite complex, in other cases they can be quite simple.
Recent procedural shader compilers, such as SGI s ISL (Chapter 14) and Stanford s RTSL (Chapter 15), are based on full-featured shading languages that resemble the Renderman shading language. Such tools are useful for complex procedural shaders, but when a developer wants to integrate a variety of rather simple shaders into a real-time application, these full-featured shader little-language compilers can be overkill.
The Evans & Sutherland Multitexturing Language is designed to compile simple one-liner shading expressions into real-time applications. A procedural shader in ESMTL is an expression of the surface, viewing, and lighting attributes. The shader returns an RGB ? value that captures the appearance of the fragment. Shader expressions are functions of zero or more of the following variables: the surface normal N; the view vector V; the light vector L; the (light s) reflection vector R; and the the halfway vector H. The expression can apply a variety of operations on these attributes. The shading language takes advantage of texture shading for the evaluation of its results. For example, the shader expression
yields the shading shown previously in Figure 6.1. The ESMTL compiler creates an expression tree from the shading expression. This expression tree is then converted into multitexturing commands...