
302 Chapter 4 Scene Graphs
The
Configure function call is what MultitextureEffect uses to determine which
vertex and pixel shaders to use. The shader programs must already exist.
Exercise
4.2
Create more Cg programs to be used by the MultitextureEffect class for blending
two textures. Create at least one program that uses three textures. Modify the
Sam-
pleGraphics/Multitextures
sample application to test your programs.
Exercise
4.3
Modify MultitextureEffect::Configure to stitch together separate shader programs.
The alpha-state parsing code will not change, but instead of creating a file name, you
should load the separate Cg programs, create a new Cg program ...