Real-Time Shading

The Stanford Real-Time Shading Language (RTSL) is both higher- and lower-level than ISL. It is higher-level in that it allows arbitrary expressions as statements in the shading language, but it is also lower-level in that it doesn t have conditional or looping control constructs [146]. Its targets include multipass rendering with OpenGL, and single pass using shading extensions introduced in NVIDIA s GeForce3 and ATI s Radeon 8500.
The logical model for RTSL consists of just two stages: surface shader and light shader. This choice of stages is based more on purpose than the specific hardware implementation, a choice that allows the same model to be applied across several hardware platforms (see Chapter 4 for an explanation of our logical model diagrams).
An extra distortion shader stage also exists, but is not fully documented. It operates as a combined transform shader, returning transformed vertex, normal and tangent directions.
Each shader can include operations across all physical stages of the actual hardware. The surface shading stage includes both interpolation or texture coordinate generation as well as the surface shading aspects of Figure 4.3.
As mentioned, you can write three types of shaders in this language: distortion; surface; and light. Code in distortion shaders can target either host or vertex shader hardware. Both surface and light may generate code for all stages of the physical hardware, from host to vertex shader to fragment shader. The Stanford system supports...