The term shader originates from the fact that Cg has been used mainly to simulate realistic lighting conditions (shadows) on 3D models. Despite this, shaders are now much more than that. They not only define the way the objects are going to look, they can also redefine their shapes entirely. If you want to learn how to manipulate the geometry of a 3D object via shaders, this is the chapter for you.
In this chapter, you will learn the following recipes:
Accessing a vertex color in a Surface Shader
Animating vertices in a Surface Shader
Extruding your models
Implementing a snow shader
Implementing a volumetric explosion