ABSTRACT

This chapter describes the basic steps needed to set up shading (Sh) for use as well as some basic test applications provided as part of the Sh distribution. All Sh functions and classes are enclosed in the Sh namespace. Sh names are defined to avoid conflicts with other common libraries, in particular the standard libraries. The shrike application is available as a free download from the Sh website. The shrike application is a testbed environment for developing and tuning shaders. The API documentation generated by structured comments should be considered the definitive reference for all functions, classes, frameworks, and program object generators implemented by the Sh library. The chapter provides a class framework for shaders, a browser interface to compare multiple shaders, and a generic interface for loading models and texture maps. A simple user interface is available for rotating models and moving them relative to light sources, storing definition-time constants, and reinitializing metaprogrammed shaders as needed.