45 #include <kaydaradef.h> 50 #define FBSDK_DLL K_DLLIMPORT 56 K_FORWARD( KRenderOptions );
57 K_FORWARD( KModelRenderInfo );
58 K_FORWARD( KShaderModelInfo );
60 #ifdef FBSDKUseNamespace 71 #define FBRegisterShader( UniqueNameStr, ClassName, Label, Description, IconFilename ) \ 72 HIObject RegisterShader##ClassName( HIObject ,const char* pName,void * ) \ 74 ClassName *Class = new ClassName( pName ); \ 75 Class->UniqueName = UniqueNameStr; \ 76 Class->ShaderDescription = Description; \ 77 if (Class->FBCreate()) { \ 78 return Class->GetHIObject(); \ 84 FBLibraryModule( ClassName ) \ 86 FBRegisterObject( ClassName##R1,"renderer/usershader/ogl",Label,Description,RegisterShader##ClassName,true, IconFilename ); \ 87 FBRegisterObject( ClassName##R2,"FbxStorable/Shader",UniqueNameStr,Description,RegisterShader##ClassName,true, IconFilename ); \ 94 #define FBShaderDeclare( ClassName, Parent ) \ 95 FBClassDeclare( ClassName,Parent); \ 97 ClassName(const char* pName):Parent(pName) { FBClassInit; } \ 103 #define FBShaderImplementation( ThisComponent ) \ 104 FBClassImplementation( ThisComponent ) 258 FBShader* CreateShader(
const char* pShaderTypeName );
307 virtual void UpdateModelShaderInfo(
int pShader_Version);
315 int GetSubRegionIndex();
321 int GetModelVersion()
const;
324 int GetShaderVersion()
const;
327 bool GetOriginalTextureFlag()
const;
330 unsigned int GetGeometryArrayIds()
const;
333 void SetGeometryArrayIds(
unsigned int pArrayIds);
336 KShaderModelInfo* mLocalPtr;
355 int GetRenderFrameId()
const;
360 bool IsIDBufferRendering()
const;
365 float GetIDBufferPickingAlphaThreshold()
const;
370 bool IsOfflineRendering()
const;
374 #ifndef DOXYGEN_SHOULD_SKIP_THIS 376 HKRenderOptions mRenderOptions;
419 kFBShaderCapacityNone = 0,
432 kFBShaderPassActionNone = 0,
433 kFBShaderPassTypeBegin = 1 << 0,
434 kFBShaderPassTypeEnd = 1 << 1,
435 kFBShaderPassInstanceBegin = 1 << 2,
436 kFBShaderPassInstanceEnd = 1 << 3,
437 kFBShaderPassMaterialBegin = 1 << 4,
438 kFBShaderPassMaterialEnd = 1 << 5,
439 kFBShaderPassGeometryBegin = 1 << 6,
440 kFBShaderPassGeometryEnd = 1 << 7,
441 kFBShaderPassModelsDraw = 1 << 8,
442 kFBShaderPassModelDraw = 1 << 9
462 FBShader(
const char* pName, HIObject pObject=NULL);
464 IObject_Declare(K_IMPLEMENTATION);
471 virtual FBShaderModelInfo* NewShaderModelInfo(HKModelRenderInfo pModelRenderInfo,
int pSubRegionIndex);
488 virtual void ReplaceAll(
FBModel* pModel );
493 virtual void Append(
FBModel* pModel );
498 virtual bool ShaderNeedBeginRender();
594 virtual void ShaderPassDrawShadowBegin(
FBRenderOptions* pRenderOptions);
599 virtual void ShaderPassDrawShadowEnd (
FBRenderOptions* pRenderOptions);
611 virtual void CloneShaderParameter(
FBShader* pNewShader );
635 void InvalidateShaderVersion ();
638 int GetShaderVersion ()
const;
652 int GetDrawInstancedMaximumSize()
const;
655 void SetDrawInstancedMaximumSize(
int pMaxSize);
661 virtual void UploadModelViewMatrixArrayForDrawInstanced(
const double* pModelViewMatrixArray,
int pCount);
903 #ifdef FBSDKUseNamespace
class K_DLLIMPORT FBPropertyBase< double, kFBPT_double > FBPropertyDouble
Property: double
Similar to the Projective Shadow, except that it uses a boolean algorithm to create a self-shadow...
#define __FBClassDeclare(Name, Parent)
For internal use only.
FBPropertyBool LocalShadow
Read Write Property: Creates an accurate projection of a shadow for each object.
Open Reality renderer interface.
#define FB_DEFINE_LIST(DllTag, Type)
Define a component list.
PropertyList: Concrete class for PropertyList of component
FBPropertyBool Enable
Read Write Property: Is the shader Enabled
FB_DEFINE_COMPONENT(K_DLLIMPORT, AnimationNode)
Animation node class.
Template class to contain an array of items.
FBPropertyShadowFrameType ShadowFrameType
Read Write Property: Used to select the shadow calculation method.
FBPropertyBool UseSpecular
Read Write Property: Activate the Specularity option.
This shader is acting as a material effect, should sitting behind the material central network...
Uses a texture projection to create a shadow.
This shader will able to draw additional texture layer (for example, live shadow or reflection)...
FBPropertyListObject Lights
List: List of light object which will produce shadows.
Bases the shadow calculation on the shadow of the caster.
Use this shadow type to create darkened shadow areas only on planar surfaces.
Contains definitions for devices, boxes and models.
FBPropertyBool UseLuminosity
Read Write Property: Activate the Luminosity option.
FBStringList ShaderTypeNamesLocalized
List of available shaders.
#define FB_DEFINE_ENUM(DllTag, Type)
Define an enum and give it the ability to be a property.
Viewing options for rendering.
FBModel * GetFBModel()
Get Model.
Creates custom cameras and manages system cameras.
FBPropertyDouble ShadowZOffset
Read Write Property: Specifies the offset of the Live Shadow shader's plane from the original selecte...
class K_DLLIMPORT FBPropertyBase< bool, kFBPT_bool > FBPropertyBool
Property: bool
FB_FORWARD(FBViewingOptions)
FBRenderOptions.
const char * ShaderDescription
Description.
Uses a texture projection as a shadow.
FBPropertyDouble Contrast
Read Write Property: Changes the contrast of the object when it reflects light.
FBStringList ShaderTypeNames
List of available shaders.
FBShaderPassActionCallback
Shader Pass Action Callback.
Bases the shadow calculation on the shadow of the receiver.
Translucent(Models Z Sort).
FBPropertyDouble Specular
Read Write Property: Changes an object's level of shininess when it reflects light by affecting the s...
FBPropertyBool UseContrast
Read Write Property: Activate the Contrast option.
FBPropertyAnimatableDouble Alpha
Read Write Property: Controls the actual effect of the shader on the object. At 0.0 it does nothing, and at 1.0 it fully affects the object.
FBAlphaSource
Shader transparency computation.
KShaderModelInfo * GetShaderModelInfo() const
Get Internal ShaderModelInfo object.
Writes to depth buffer where Alpha > 0.5.
FBPropertyListObject Models
List: List of object which when lighted will cast a shadow.
FBShadowFrameType
Shadow calculation methods.
Undocumented or unsupported.
#define __FB_FORWARD(ClassName)
Forwarding of class and typedef declaration.
Models are blended additively.
FBShadowType
Shadow types.
#define FBSDKNamespace
FBSDKNamespace define.
This shader can support GL_ARB_draw_instanced extension, and thus could benefit from Geometry instanc...
#define FBSDK_DLL
Be sure that FBSDK_DLL is defined only once...
This shader will able to draw different shape thus generate different shadow than original solid geom...
FBRenderingPass
Rendering Pass.
A box is a fundamental building block in the application architecture.
FBPropertyAlphaSource Transparency
Read Write Property: Indicates the computation method of the transparency.
class K_DLLIMPORT FBPropertyBaseAnimatable< double, kFBPT_double > FBPropertyAnimatableDouble
FBPropertyBaseAnimatableDouble type definition.
FBPropertyAnimatableDouble ShadowIntensity
Read Write Property: Controls the darkness of shadows cast by a selected object.
Similar to the Planar Shadow, except that it treats all objects as opaque.
Models are sorted and blended.
Shader Shadow Live class.
#define FBClassDeclare(Name, Parent)
Class declaration.
FBPropertyRenderingPass RenderingPass
Read Write Property: Rendering pass object are shaded in.
Alpha > 0.5 will show up.
FBPropertyShadowType ShadowType
Read Write Property: Indicate which shadow type is desired.
FBShaderCapacity
Shader Capacity.
Similar to the Projective Light Map except that it uses a boolean algorithm to create a self-shadow...
FBPropertyBool UseGobo
Read Write Property: Includes the gobo in the shadow map calculation.
FBPropertyDouble Luminosity
Read Write Property: Changes the brightness of the object when reflecting light.