Game Development Reference
In-Depth Information
d3d::Release<IDirect3DVertexShader9*>(DiffuseShader);
d3d::Release<ID3DXConstantTable*>(DiffuseConstTable);
}
17.5 Sample Application: Cartoon Rendering
As a second vertex shader sample, let's write two vertex shaders that
shade and outline a mesh in such a way that it appears as a cartoon-
style drawing. Figure 17.2 illustrates this:
Figure 17.2: (a) Objects
shaded using cartoon shad-
ing (note the sharp transition
between shades). (b) To
enhance the cartoon effect,
the silhouette edges are out-
lined. (c) Objects shaded
using standard diffuse
lighting.
Search WWH ::




Custom Search