#include <ShadeDll.h>
Inheritance diagram for Shader2:
Public Member Functions | |
Shader2 (HTreeObject *treeobject) | |
virtual const char * | GetShaderAmbianceFilters ()=0 |
virtual void | GetAmbiance (HShading *shading)=0 |
To write a shader plug-in for Animation Master you must derive a class from the Shader class provided in "ShadeDll.h". The derivation should look something like this:
class MyCoolShader : public Shader2;
Once you have declared your new class, you can begin overriding the virtual functions found in the Shader2 base class or in the DLLPlugin base class. You will need to override nearly every function in the base classes to have a completely functional new shader.
A Shader2 may compute an ambiance value in addition to either a diffuse value, a specular value or all values.
The speciic Ambiance part of a Shader2 is called only once per scene per pixel. The returned ambiance value is added in the rendering equation.
The diffuse and specular parts of the Shaders are called for each lights in the scene. The hit point on the surface of the object is the actual world hit point. This is different from the hit point for Textures and Turbulence.
Definition at line 22 of file ShadeDll.h.
|
Definition at line 24 of file ShadeDll.h. |
|
Returns in the HShading parameter the computed ambiance value.
|
|
Indicated whether the plugin will compute an ambiance value.
const char *CustomShader::GetShaderAmbianceFilters() { AFX_MANAGE_STATE(AfxGetStaticModuleState()); static CString filter; filter.LoadString(IDS_MENUFILTER); return (LPCTSTR)filter; } |
Generated on Thu Oct 27 11:47:03 2005 with
1.4.5 written by Dimitri van Heesch,
© 1997-2001