
Chapter
20
Special Effects
Using Shaders
Various shader progr ams are described in this chapter. Their level of complexity
varies from very simple (vertex colors, single textures, lights, and materials) to very
complicated (planar shadows, planar reflections, water effects). The shader programs
built into the engine are found in the folder
GeometricTools/WildMagic4/Shader Programs/Cg
Some applications have their own specially constructed shader programs. The
shader files are located in the application folders.
20.1 Vertex Colors
Applying vertex colors to a geometric object is a simple task. The Vertex.cg file
contains two vertex programs:
void v_VertexColor3 ...