
Appendix
Creating a Shader in
Wild Magic
There are two basic ways to create a shader effect in Wild Magic version 4. The first
method is classless in that you assemble all the components within your application
code and attach the effect to the geometric primitive of interest. The second method
involves creating a new class, either derived from
ShaderEffect for a local efffect or
derived from
Effect for a global effect that requires its own drawing function.
The sections in this appendix illustrate the two methods for a particular effect.
The sample application is located in
GeometricTools/WildMagic4/SampleGraphics/BlendedTerrain
and contains a height field ...