Chapter 2
Types

Several types are supported by the Sh library. Two general categories of types exist: classes that provide control of constructed objects such as shaders and textures, and those that provide values (expressions) manipulated by expressions. There is some overlap between these two. In particular, program objects can be used in expressions as subroutines, and texture objects can be used with the array-access operator to indicate texture lookups inside shaders.


Note: This manual is available as a bound book from AK Peters, including better formatting, in-depth examples, and about 200 pages not available on-line.