Standard and implementation-dependent shaders should always be specified in the Shading Language, even if they are built in. The predefined shaders provided by the Shading Language are listed in Table 10.1, Standard Shaders . There is also a null shader that is used as a placeholder. Shading Language definitions for these shaders are given in Appendix A . Table 10.1 Standard Shaders Type Shader Light sources ambientlight distantlight pointlight spotlight Surfaces constant matte metal shinymetal plastic paintedplastic Atmosphere fog depthcue Displacement bumpy Shaders contain instance variables that customize a particular shader of that type.
All instance variables have default values that are specified in the definition of the shader.
When a shader is added to the graphics state, these default values may be overridden by user-supplied values. This is done by giving a parameter list consisting of name-value pairs. The names in this list are the same as the names of the instance variables in the shader definition. Note that many different versions of the same shader can be instanced by giving different values for its instance variables. The instance variables associated with a shader effectively enlarge the current graphics state to include new appearance attributes.