Real-Time Shading

The pfman language was developed specifically for real-time execution on the PixelFlow graphics machine [130]. It is also a high-level C-like language, quite similar to RenderMan.
The logical model for PixelFlow was presented earlier to guide our initial presentation of the logical model diagrams in Chapter 4. We reproduce this diagram here for reference (Figure 13.1). We will point out this time around which procedural stages were actually implemented. Surface and light shaders were implemented and well-utilized by users of the PixelFlow system. Primitive and interpolate stages were also implemented but were not as effective, and were never really used.
Pfman shares many of RenderMan s shading features, including uniform and varying type modifiers and an illuminance construct for accumulating the contribution of lights in the scene. It also shares the use of separate types for vector, normal, point, color, and matrix. Since the pfman language was developed before RenderMan had all of these distinct types, the syntax chosen is slightly different. It defines vector types using arrays of simpler data types with extra attributes transform_as_vector float v[3] or float transform_as_point p[4]. It also includes an attribute unit that indicates that a vector should be normalized before it is used by the shader. This takes the place of the common idiom in RenderMan shaders of always using normalize(N) instead of N alone, since the surface normal is not...