Shader Shadow Live class.
Use the Live Shadow shader to apply real-time shadows to models. You can specify shadow intensity as well as the lights and objects that cast shadows in a scene.
There are two methods to create a FBShaderShadowLive object: using the FBShaderManager, or simply by instantiating a class object explicitely.
Sample C++ code:
// Create a shadow shader. HFBShaderShadowLive lShader = new FBShaderShadowLive( "New Shader" ); // Add a cube in its list of affected objects. HFBModel lModel = FBFindModelByName( "Cube" ) if( lModel ) { lShaderShadowLive.Add( lCube ); }
Sample Python code:
from pyfbsdk import * # Create shader. lShader = FBShaderShadowLive( 'New Python Shader' ) # Find a cube to put in our list of affected objects. lModel = FBFindModelByName( 'Cube' ) if lModel: lShader.ShadowCasterProperty.append( lModel )
Definition at line 678 of file fbshader.h.
#include <fbshader.h>
Public Member Functions |
|
FBShaderShadowLive (const char *pName, HIObject pObject=NULL) | |
Constructor. |
|
Public Attributes |
|
FBPropertyShadowType | ShadowType |
Read Write Property: Indicate which
shadow type is desired. |
|
FBPropertyAnimatableDouble | ShadowIntensity |
Read Write Property: Controls the
darkness of shadows cast by a selected object. |
|
FBPropertyBool | LocalShadow |
Read Write Property: Creates an
accurate projection of a shadow for each object. |
|
FBPropertyBool | UseGobo |
Read Write Property: Includes the
gobo in the shadow map calculation. |
|
FBPropertyDouble | ShadowZOffset |
Read Write Property: Specifies the
offset of the Live Shadow shader's plane from the original selected
plane. |
|
FBPropertyShadowFrameType | ShadowFrameType |
Read Write Property: Used to select
the shadow calculation method. |
|
FBPropertyListObject | Lights |
List: List of light object which will
produce shadows. |
|
FBPropertyListObject | Models |
List: List of object which when
lighted will cast a shadow. |
FBShaderShadowLive | ( | const char * | pName, |
HIObject | pObject =
NULL |
||
) |
Constructor.
pName | Name of shader. |
pObject | Internal parent object to own shader (default is NULL). |
FBPropertyShadowType ShadowType |
Read Write Property: Indicate which shadow type is desired.
Definition at line 690 of file fbshader.h.
Read Write Property: Controls the darkness of shadows cast by a selected object.
Definition at line 691 of file fbshader.h.
Read Write Property: Creates an accurate projection of a shadow for each object.
Definition at line 692 of file fbshader.h.
Read Write Property: Includes the gobo in the shadow map calculation.
Definition at line 693 of file fbshader.h.
Read Write Property: Specifies the offset of the Live Shadow shader's plane from the original selected plane.
Definition at line 694 of file fbshader.h.
FBPropertyShadowFrameType ShadowFrameType |
Read Write Property: Used to select the shadow calculation method.
Definition at line 695 of file fbshader.h.
List: List of light object which will produce shadows.
Definition at line 697 of file fbshader.h.
List: List of object which when lighted will cast a shadow.
Definition at line 698 of file fbshader.h.