Open Reality Reference Guide
fbshader.h
Go to the documentation of this file.
1 #ifndef _FB_SHADER_H_
2 #define _FB_SHADER_H_
3 /**************************************************************************
4 Copyright (c) 1994 - 2009 Autodesk, Inc. and/or its licensors.
5 All Rights Reserved.
6 
7 The coded instructions, statements, computer programs, and/or related
8 material (collectively the "Data") in these files contain unpublished
9 information proprietary to Autodesk, Inc. and/or its licensors, which is
10 protected by Canada and United States of America federal copyright law
11 and by international treaties.
12 
13 The Data may not be disclosed or distributed to third parties, in whole
14 or in part, without the prior written consent of Autodesk, Inc.
15 ("Autodesk").
16 
17 THE DATA IS PROVIDED "AS IS" AND WITHOUT WARRANTY.
18 ALL WARRANTIES ARE EXPRESSLY EXCLUDED AND DISCLAIMED. AUTODESK MAKES NO
19 WARRANTY OF ANY KIND WITH RESPECT TO THE DATA, EXPRESS, IMPLIED OR
20 ARISING BY CUSTOM OR TRADE USAGE, AND DISCLAIMS ANY IMPLIED WARRANTIES
21 OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR
22 PURPOSE OR USE. WITHOUT LIMITING THE FOREGOING, AUTODESK DOES NOT
23 WARRANT THAT THE OPERATION OF THE DATA WILL BE UNINTERRUPTED OR ERROR
24 FREE.
25 
26 IN NO EVENT SHALL AUTODESK, ITS AFFILIATES, PARENT COMPANIES, LICENSORS
27 OR SUPPLIERS ("AUTODESK GROUP") BE LIABLE FOR ANY LOSSES, DAMAGES OR
28 EXPENSES OF ANY KIND (INCLUDING WITHOUT LIMITATION PUNITIVE OR MULTIPLE
29 DAMAGES OR OTHER SPECIAL, DIRECT, INDIRECT, EXEMPLARY, INCIDENTAL, LOSS
30 OF PROFITS, REVENUE OR DATA, COST OF COVER OR CONSEQUENTIAL LOSSES OR
31 DAMAGES OF ANY KIND), HOWEVER CAUSED, AND REGARDLESS OF THE THEORY OF
32 LIABILITY, WHETHER DERIVED FROM CONTRACT, TORT (INCLUDING, BUT NOT
33 LIMITED TO, NEGLIGENCE), OR OTHERWISE, ARISING OUT OF OR RELATING TO THE
34 DATA OR ITS USE OR ANY OTHER PERFORMANCE, WHETHER OR NOT AUTODESK HAS
35 BEEN ADVISED OF THE POSSIBILITY OF SUCH LOSS OR DAMAGE.
36 
37 **************************************************************************/
38 
45 #include <kaydaradef.h>
46 #ifndef FBSDK_DLL
50 #define FBSDK_DLL K_DLLIMPORT
51 #endif
52 
53 #include <fbsdk/fbcomponent.h>
54 #include <fbsdk/fbcore.h>
55 
56 K_FORWARD( KRenderOptions );
57 K_FORWARD( KModelRenderInfo );
58 K_FORWARD( KShaderModelInfo );
59 
60 #ifdef FBSDKUseNamespace
61 namespace FBSDKNamespace {
62 #endif
63 
71 #define FBRegisterShader( UniqueNameStr, ClassName, Label, Description, IconFilename ) \
72  HIObject RegisterShader##ClassName( HIObject /*pOwner*/,const char* pName,void * /*pData*/) \
73  { \
74  ClassName *Class = new ClassName( pName ); \
75  Class->UniqueName = UniqueNameStr; \
76  Class->ShaderDescription = Description; \
77  if (Class->FBCreate()) { \
78  return Class->GetHIObject(); \
79  } else { \
80  delete Class; \
81  return NULL; \
82  } \
83 } \
84  FBLibraryModule( ClassName ) \
85  { \
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 ); \
88 }
89 
94 #define FBShaderDeclare( ClassName, Parent ) \
95  FBClassDeclare( ClassName,Parent); \
96 public: \
97  ClassName(const char* pName):Parent(pName) { FBClassInit; } \
98 private:
99 
103 #define FBShaderImplementation( ThisComponent ) \
104  FBClassImplementation( ThisComponent )
105 
107  // FBShaderManager
110  FB_FORWARD( FBShader );
112  FB_FORWARD( FBCamera );
113 
222  {
228 
233  FBShaderManager& operator=( const FBShaderManager& );
234 
235  public:
236 
239 
246 
258  FBShader* CreateShader( const char* pShaderTypeName );
259 
269 
292  };
293 
294 
296  // FBShader - Shader layer on top of internals.
298 
301  {
302  public:
303  FBShaderModelInfo(FBShader* pShader, HKModelRenderInfo pInfo, int pSubRegionIndex);
304  virtual ~FBShaderModelInfo();
305 
307  virtual void UpdateModelShaderInfo(int pShader_Version);
308 
310  FBModel* GetFBModel() { return mFBModel; }
311 
314 
315  int GetSubRegionIndex();
316 
318  KShaderModelInfo* GetShaderModelInfo() const { return mLocalPtr; }
319 
321  int GetModelVersion() const;
322 
324  int GetShaderVersion() const;
325 
328 
330  unsigned int GetGeometryArrayIds() const;
331 
333  void SetGeometryArrayIds(unsigned int pArrayIds);
334 
335  private:
336  KShaderModelInfo* mLocalPtr;
337  FBModel* mFBModel;
338  };
339 
343 
345  {
346  public:
347  FBRenderOptions(HKRenderOptions pOptions);
348 
351 
355  int GetRenderFrameId() const;
356 
360  bool IsIDBufferRendering() const;
361 
366 
370  bool IsOfflineRendering() const;
371 
372  FBViewingOptions* GetViewerOptions() const;
373 
374 #ifndef DOXYGEN_SHOULD_SKIP_THIS
376  HKRenderOptions mRenderOptions;
377 #endif
378  };
379 
381 
386  kFBPassPreRender = 1 << 0,
387  kFBPassFlat = 1 << 1,
388  kFBPassLighted = 1 << 2,
389  kFBPassMatte = 1 << 3,
393  kFBPassAddColor = 1 << 7,
395  kFBPassPostRender = 1 << 9
396  };
397  FB_DEFINE_ENUM( FBSDK_DLL, RenderingPass );
398 
404  {
412  };
413  FB_DEFINE_ENUM( FBSDK_DLL, AlphaSource );
414 
418  {
419  kFBShaderCapacityNone = 0,
424  };
425  FB_DEFINE_ENUM( FBSDK_DLL, ShaderCapacity );
426 
431  {
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
443  };
444  FB_DEFINE_ENUM( FBSDK_DLL, ShaderPassActionCallback );
445 
448  FB_DEFINE_COMPONENT ( FBSDK_DLL, Shader );
449  FB_DEFINE_LIST ( FBSDK_DLL, Shader );
450 
452  class FBSDK_DLL FBShader : public FBBox
453  {
454  //--- Open Reality declaration.
456 
457  public:
462  FBShader( const char* pName, HIObject pObject=NULL);
463 
464  IObject_Declare(override); // Interface to IObject.
465 
471  virtual FBShaderModelInfo* NewShaderModelInfo(HKModelRenderInfo pModelRenderInfo, int pSubRegionIndex);
472 
477  virtual void UpdateModelShaderInfo( FBRenderOptions* pOptions, FBShaderModelInfo* pInfo );
478 
483  virtual void DestroyShaderModelInfo( FBRenderOptions* pOptions, FBShaderModelInfo* pInfo );
484 
489  virtual bool ReplaceAll( FBModel* pModel );
490 
495  virtual bool Append( FBModel* pModel );
496 
500  virtual bool ShaderNeedBeginRender();
501 
507  virtual void ShaderBeginRender( FBRenderOptions* pOptions, FBShaderModelInfo* pInfo );
508 
514  virtual void ShadeModel( FBRenderOptions* pOptions, FBShaderModelInfo* pInfo, FBRenderingPass pPass );
515 
520  virtual void ShadeModelShadow(FBRenderOptions* pRenderOptions, FBShaderModelInfo* pInfo);
521 
526 
531  virtual void ShaderPassTypeBegin ( FBRenderOptions* pRenderOptions, FBRenderingPass pPass);
532 
537  virtual void ShaderPassTypeEnd ( FBRenderOptions* pRenderOptions, FBRenderingPass pPass);
538 
543  virtual void ShaderPassInstanceBegin( FBRenderOptions* pRenderOptions, FBRenderingPass pPass);
544 
549  virtual void ShaderPassInstanceEnd ( FBRenderOptions* pRenderOptions, FBRenderingPass pPass);
550 
556  virtual void ShaderPassMaterialBegin( FBRenderOptions* pRenderOptions, FBRenderingPass pPass, FBShaderModelInfo* pInfo);
557 
563  virtual void ShaderPassMaterialEnd ( FBRenderOptions* pRenderOptions, FBRenderingPass pPass, FBShaderModelInfo* pInfo);
564 
570  virtual void ShaderPassGeometryBegin( FBRenderOptions* pRenderOptions, FBRenderingPass pPass, FBShaderModelInfo* pInfo);
571 
577  virtual void ShaderPassGeometryEnd ( FBRenderOptions* pRenderOptions, FBRenderingPass pPass, FBShaderModelInfo* pInfo);
578 
584  virtual void ShaderPassModelsDraw ( FBRenderOptions* pRenderOptions, FBRenderingPass pPass, const FBArrayTemplate<FBShaderModelInfo*>& pInfoArray);
585 
591  virtual void ShaderPassModelDraw ( FBRenderOptions* pRenderOptions, FBRenderingPass pPass, FBShaderModelInfo* pInfo);
592 
596  virtual void ShaderPassDrawShadowBegin( FBRenderOptions* pRenderOptions);
597 
601  virtual void ShaderPassDrawShadowEnd ( FBRenderOptions* pRenderOptions);
602 
607 
609 
613  virtual void CloneShaderParameter( FBShader* pNewShader );
614 
619  virtual void DetachDisplayContext( FBRenderOptions* pOptions, FBShaderModelInfo* pInfo );
620 
625  virtual bool FbxStore (FBFbxObject* pFbxObject);
626 
632  virtual bool FbxRetrieve(FBFbxObject* pFbxObject, FBRenderer* pRenderer);
633 
634  const char* ShaderDescription;
635 
638 
640  int GetShaderVersion () const;
641 
644 
647 
651  void SetShaderCapacity (FBShaderCapacity pCapacity, bool pOn);
652 
655 
657  void SetDrawInstancedMaximumSize(int pMaxSize);
658 
663  virtual void UploadModelViewMatrixArrayForDrawInstanced(const double* pModelViewMatrixArray, int pCount);
664 
665 
666  public:
670 
676  FBPropertyRenderingPass RenderingPass;
677 
678  protected:
686  };
687 
689  // FBPropertyListShader - List of shaders
693  {
694  public:
700  FBShader* operator[](int pIndex);
701  };
702 
704  // FBShaderLighted
707  FB_DEFINE_COMPONENT( FBSDK_DLL, ShaderLighted );
708 
776  {
777  //--- Open Reality declaration.
779 
780  public:
785  FBShaderLighted( const char* pName, HIObject pObject=NULL );
786 
789 
792 
795 
796  FBPropertyAlphaSource Transparency;
798  };
799 
800 
802  // FBShaderShadowLive
805  FB_DEFINE_COMPONENT( FBSDK_DLL, ShaderShadowLive );
806 
811  {
818  };
819  FB_DEFINE_ENUM( FBSDK_DLL, ShadowType );
820 
824  {
828  };
829  FB_DEFINE_ENUM( FBSDK_DLL, ShadowFrameType );
830 
831 
881  {
882  //--- Open Reality declaration.
884 
885  public:
890  FBShaderShadowLive( const char* pName, HIObject pObject=NULL );
891 
892  FBPropertyShadowType ShadowType;
897  FBPropertyShadowFrameType ShadowFrameType;
898 
901 
902  };
903 
904 
905 #ifdef FBSDKUseNamespace
906 }
907 #endif
908 #endif /* _FB_SHADER_H_ */
Template class to contain an array of items.
Definition: fbarray.h:78
A box is a fundamental building block in the application architecture.
Definition: fbcore.h:218
Creates custom cameras and manages system cameras.
Definition: fbcamera.h:206
FBX file interface.
Definition: fbfbx.h:80
Material class.
Definition: fbmaterial.h:87
Model class.
Definition: fbmodel.h:274
PropertyList: Concrete class for PropertyList of component
Definition: fbcomponent.h:536
List of scene objects.
Definition: fbcomponent.h:556
PropertyList: Shader
Definition: fbshader.h:693
FBShader * operator[](int pIndex)
Get the shader from list at pIndex.
float GetIDBufferPickingAlphaThreshold() const
Get IDBuffer Picking Alpha threshold.
bool IsIDBufferRendering() const
Get IDBuffer Rendering request status (for display or picking)
FBCamera * GetRenderingCamera()
Get the rendering camera.
bool IsOfflineRendering() const
Check if the render request comes from offline render mode (as opposed to viewport refresh).
int GetRenderFrameId() const
Get Render Frame ID.
Open Reality renderer interface.
Definition: fbrenderer.h:446
Shader class.
Definition: fbshader.h:453
virtual void ShaderPassModelsDraw(FBRenderOptions *pRenderOptions, FBRenderingPass pPass, const FBArrayTemplate< FBShaderModelInfo * > &pInfoArray)
For all the models with the same material/geometry mappings, inside this functions,...
virtual void UploadModelViewMatrixArrayForDrawInstanced(const double *pModelViewMatrixArray, int pCount)
Callback for uploading the modelview array when draw instanced.
virtual bool Append(FBModel *pModel)
Append shader to pModel.
virtual void ShaderPassTypeBegin(FBRenderOptions *pRenderOptions, FBRenderingPass pPass)
For all the shader instances of the same type, to setup the common state for all this type of shaders...
virtual void ShaderPassMaterialBegin(FBRenderOptions *pRenderOptions, FBRenderingPass pPass, FBShaderModelInfo *pInfo)
For all the models mapped with this material and associated with this shader instance,...
static FBRenderingPass GetRenderingPassNeededForAlpha(FBAlphaSource pTransparency)
In order to be called at the right passes, a shader must set the result of GetRenderingPassNeededForA...
virtual void ShaderPassDrawShadowEnd(FBRenderOptions *pRenderOptions)
Shadow draw pass end notify for shader with kFBShaderCapacityMaterialEffect and kFBShaderCapacityDraw...
FBPropertyRenderingPass RenderingPass
Read Write Property: Rendering pass object are shaded in.
Definition: fbshader.h:676
virtual void UpdateModelShaderInfo(FBRenderOptions *pOptions, FBShaderModelInfo *pInfo)
Update shader-model information when model, material & texture mapping or shader setting change.
virtual void DetachDisplayContext(FBRenderOptions *pOptions, FBShaderModelInfo *pInfo)
Detach the display context from the shader.
virtual void ShaderPassTypeEnd(FBRenderOptions *pRenderOptions, FBRenderingPass pPass)
For all the shader instances of the same type, to clean the common state for all this type of shaders...
virtual void ShaderPassInstanceEnd(FBRenderOptions *pRenderOptions, FBRenderingPass pPass)
For all the models associated with this shader instance, to clean the common state for this shader in...
FBShaderPassActionCallback GetShaderPassActionCallback() const
Get Shader Pass Action Callback registration;.
virtual void ShaderPassGeometryEnd(FBRenderOptions *pRenderOptions, FBRenderingPass pPass, FBShaderModelInfo *pInfo)
For all the models instanced from the same geometry, to clean the common VBO state for this shader in...
void SetShaderPassActionCallback(FBShaderPassActionCallback pCallback)
Set Shader Pass Action Callback registration;.
void InvalidateShaderVersion()
Invalidate Shader version to trigger model-shader informaton to be updated.
virtual void ShaderPassMaterialEnd(FBRenderOptions *pRenderOptions, FBRenderingPass pPass, FBShaderModelInfo *pInfo)
For all the models mapped with this material and associated with this shader instance,...
virtual FBShaderModelInfo * NewShaderModelInfo(HKModelRenderInfo pModelRenderInfo, int pSubRegionIndex)
Create a new shader-model information object.
void SetDrawInstancedMaximumSize(int pMaxSize)
Set shader maximum size for draw instanced.
FBShader(const char *pName, HIObject pObject=NULL)
Protected constructor.
virtual void ShaderPassDrawShadowBegin(FBRenderOptions *pRenderOptions)
Shadow draw pass begin notify for shader with kFBShaderCapacityMaterialEffect and kFBShaderCapacityDr...
virtual void CloneShaderParameter(FBShader *pNewShader)
Clone shader.
virtual bool FbxStore(FBFbxObject *pFbxObject)
Storage of information into the FBX file format.
virtual bool ReplaceAll(FBModel *pModel)
Replace all shader in pModel.
virtual void ShaderPassInstanceBegin(FBRenderOptions *pRenderOptions, FBRenderingPass pPass)
For all the models associated with this shader instance, to setup the common state for this shader in...
virtual void ShadeModelShadow(FBRenderOptions *pRenderOptions, FBShaderModelInfo *pInfo)
Draw custom shadow shape callback for shader with kFBShaderCapacityDrawShadow but without kFBShaderCa...
virtual void DestroyShaderModelInfo(FBRenderOptions *pOptions, FBShaderModelInfo *pInfo)
Destroy shader-model information object callback.
FBShaderCapacity GetShaderCapacity() const
Return Shader Capacity (bitwise value)
virtual void ShadeModel(FBRenderOptions *pOptions, FBShaderModelInfo *pInfo, FBRenderingPass pPass)
Real-time shading callback for shader without kFBShaderCapacityMaterialEffect.
virtual void ShaderPassModelDraw(FBRenderOptions *pRenderOptions, FBRenderingPass pPass, FBShaderModelInfo *pInfo)
Callback for Cg/CgFx shader to setup WorldMaitrx/WorldMatrixIT parameters.
FBPropertyBool Enable
Read Write Property: Is the shader Enabled
Definition: fbshader.h:669
int GetDrawInstancedMaximumSize() const
Get shader maximum size for draw instanced.
const char * ShaderDescription
Description.
Definition: fbshader.h:634
int GetShaderVersion() const
Return Shader Version.
virtual bool ShaderNeedBeginRender()
Does the shader need a begin render call.
virtual void ShaderBeginRender(FBRenderOptions *pOptions, FBShaderModelInfo *pInfo)
Pre-rendering of shaders that is called only one time for a shader instance.
void SetShaderCapacity(FBShaderCapacity pCapacity, bool pOn)
Set Shader Capacity (bitwise value).
bool HasShaderCapacity(FBShaderCapacity pCapacity)
Return true if shader has certain capacity.
virtual void ShaderPassGeometryBegin(FBRenderOptions *pRenderOptions, FBRenderingPass pPass, FBShaderModelInfo *pInfo)
For all the models instanced from the same geometry, to setup the common VBO state for this shader in...
virtual bool FbxRetrieve(FBFbxObject *pFbxObject, FBRenderer *pRenderer)
Retrieval of information into the FBX file format.
Lighted shader class.
Definition: fbshader.h:776
FBPropertyAnimatableDouble Alpha
Read Write Property: Controls the actual effect of the shader on the object. At 0....
Definition: fbshader.h:797
FBPropertyDouble Specular
Read Write Property: Changes an object's level of shininess when it reflects light by affecting the s...
Definition: fbshader.h:794
FBPropertyAlphaSource Transparency
Read Write Property: Indicates the computation method of the transparency.
Definition: fbshader.h:796
FBPropertyDouble Luminosity
Read Write Property: Changes the brightness of the object when reflecting light.
Definition: fbshader.h:791
FBShaderLighted(const char *pName, HIObject pObject=NULL)
Constructor.
FBPropertyBool UseLuminosity
Read Write Property: Activate the Luminosity option.
Definition: fbshader.h:790
FBPropertyBool UseContrast
Read Write Property: Activate the Contrast option.
Definition: fbshader.h:787
FBPropertyDouble Contrast
Read Write Property: Changes the contrast of the object when it reflects light.
Definition: fbshader.h:788
FBPropertyBool UseSpecular
Read Write Property: Activate the Specularity option.
Definition: fbshader.h:793
Shader manager.
Definition: fbshader.h:222
FBStringList ShaderTypeNames
List of available shaders.
Definition: fbshader.h:268
FBStringList ShaderTypeNamesLocalized
List of available shaders.
Definition: fbshader.h:291
~FBShaderManager()
Destructor.
FBShader * CreateShader(const char *pShaderTypeName)
Creates a shader according to the shader type provided.
FBShaderManager()
Constructor.
bool GetOriginalTextureFlag() const
if application viewing mode request texture or not.
FBModel * GetFBModel()
Get Model.
Definition: fbshader.h:310
unsigned int GetGeometryArrayIds() const
Get the geometry array ids for rendering.
KShaderModelInfo * GetShaderModelInfo() const
Get Internal ShaderModelInfo object.
Definition: fbshader.h:318
FBMaterial * GetFBMaterial()
Get Material.
void SetGeometryArrayIds(unsigned int pArrayIds)
Get the geometry array ids for rendering.
int GetShaderVersion() const
GetLast updated shader version.
virtual void UpdateModelShaderInfo(int pShader_Version)
To be overloaded, always be called when Model or Shader version out of date.
int GetModelVersion() const
Get Last updated model version id.
Shader Shadow Live class.
Definition: fbshader.h:881
FBShaderShadowLive(const char *pName, HIObject pObject=NULL)
Constructor.
FBPropertyListObject Lights
List: List of light object which will produce shadows.
Definition: fbshader.h:899
FBPropertyListObject Models
List: List of object which when lighted will cast a shadow.
Definition: fbshader.h:900
FBPropertyShadowFrameType ShadowFrameType
Read Write Property: Used to select the shadow calculation method.
Definition: fbshader.h:897
FBPropertyShadowType ShadowType
Read Write Property: Indicate which shadow type is desired.
Definition: fbshader.h:892
FBPropertyBool UseGobo
Read Write Property: Includes the gobo in the shadow map calculation.
Definition: fbshader.h:895
FBPropertyBool LocalShadow
Read Write Property: Creates an accurate projection of a shadow for each object.
Definition: fbshader.h:894
FBPropertyDouble ShadowZOffset
Read Write Property: Specifies the offset of the Live Shadow shader's plane from the original selecte...
Definition: fbshader.h:896
FBPropertyAnimatableDouble ShadowIntensity
Read Write Property: Controls the darkness of shadows cast by a selected object.
Definition: fbshader.h:893
String list.
Definition: fbstring.h:208
Viewing options for rendering.
Definition: fbrenderer.h:176
Basic class definitions.
#define __FBClassDeclare(Name, Parent)
For internal use only.
Definition: fbcomponent.h:131
Contains definitions for devices, boxes and models.
FB_DEFINE_COMPONENT(K_DLLIMPORT, AnimationNode)
Animation node class.
#define FBClassDeclare(Name, Parent)
Class declaration.
Definition: fbdefines.h:85
class K_DLLIMPORT FBPropertyBaseAnimatable< double, kFBPT_double > FBPropertyAnimatableDouble
FBPropertyBaseAnimatableDouble type definition.
class K_DLLIMPORT FBPropertyBase< bool, kFBPT_bool > FBPropertyBool
Property: bool
#define FB_DEFINE_LIST(DllTag, Type)
Define a component list.
Definition: fbproperties.h:163
#define FB_DEFINE_ENUM(DllTag, Type)
Define an enum and give it the ability to be a property.
Definition: fbproperties.h:150
class K_DLLIMPORT FBPropertyBase< double, kFBPT_double > FBPropertyDouble
Property: double
#define FBSDK_DLL
Be sure that FBSDK_DLL is defined only once...
Definition: fbshader.h:50
FBAlphaSource
Shader transparency computation.
Definition: fbshader.h:404
@ kFBAlphaSourceTransluscentZSortAlpha
Translucent(Models Z Sort).
Definition: fbshader.h:411
@ kFBAlphaSourceNoAlpha
No transparency.
Definition: fbshader.h:405
@ kFBAlphaSourceAccurateAlpha
Accurate Transparency.
Definition: fbshader.h:406
@ kFBAlphaSourceAdditiveAlpha
Additive Transparency.
Definition: fbshader.h:410
@ kFBAlphaSource2DTransparency
2D Transparency.
Definition: fbshader.h:409
@ kFBAlphaSourceMatteAlpha
Matte.
Definition: fbshader.h:408
@ kFBAlphaSourceTransluscentAlpha
Translucent.
Definition: fbshader.h:407
FBShaderCapacity
Shader Capacity.
Definition: fbshader.h:418
@ kFBShaderCapacityDrawInstanced
This shader can support GL_ARB_draw_instanced extension, and thus could benefit from Geometry instanc...
Definition: fbshader.h:421
@ kFBShaderCapactiyDrawTextureLayer
This shader will able to draw additional texture layer (for example, live shadow or reflection).
Definition: fbshader.h:423
@ kFBShaderCapacityMaterialEffect
This shader is acting as a material effect, should sitting behind the material central network,...
Definition: fbshader.h:420
@ kFBShaderCapacityDrawShadow
This shader will able to draw different shape thus generate different shadow than original solid geom...
Definition: fbshader.h:422
FBShaderPassActionCallback
Shader Pass Action Callback.
Definition: fbshader.h:431
FBShadowType
Shadow types.
Definition: fbshader.h:811
@ kFBShadowTypeShadowTranslucentPlanar
Use this shadow type to create darkened shadow areas only on planar surfaces.
Definition: fbshader.h:812
@ kFBShadowTypeZLightMapProjectiveTexture
Similar to the Projective Light Map except that it uses a boolean algorithm to create a self-shadow.
Definition: fbshader.h:816
@ kFBShadowTypeShadowOpaquePlanar
Similar to the Planar Shadow, except that it treats all objects as opaque.
Definition: fbshader.h:817
@ kFBShadowTypeZShadowProjectiveTexture
Similar to the Projective Shadow, except that it uses a boolean algorithm to create a self-shadow.
Definition: fbshader.h:815
@ kFBShadowTypeLightMapProjectiveTexture
Uses a texture projection as a shadow.
Definition: fbshader.h:814
@ kFBShadowTypeShadowProjectiveTexture
Uses a texture projection to create a shadow.
Definition: fbshader.h:813
FBRenderingPass
Rendering Pass.
Definition: fbshader.h:384
@ kFBPassInvalid
No pass selected.
Definition: fbshader.h:385
@ kFBPassMatte
Alpha > 0.5 will show up.
Definition: fbshader.h:389
@ kFBPassPostRender
After everything.
Definition: fbshader.h:395
@ kFBPassLighted
Lighting on.
Definition: fbshader.h:388
@ kFBPassZTranslucentAlphaTest
Writes to depth buffer where Alpha > 0.5.
Definition: fbshader.h:391
@ kFBPassPreRender
Before anything.
Definition: fbshader.h:386
@ kFBPassZTranslucent
Writes to depth buffer.
Definition: fbshader.h:390
@ kFBPassTranslucent
Models are blended.
Definition: fbshader.h:392
@ kFBPassTranslucentZSort
Models are sorted and blended.
Definition: fbshader.h:394
@ kFBPassFlat
Lighting off.
Definition: fbshader.h:387
@ kFBPassAddColor
Models are blended additively.
Definition: fbshader.h:393
FBShadowFrameType
Shadow calculation methods.
Definition: fbshader.h:824
@ kFBShadowFrameTypeShadowCaster
Bases the shadow calculation on the shadow of the caster.
Definition: fbshader.h:826
@ kFBShadowFrameTypeShadowReceiver
Bases the shadow calculation on the shadow of the receiver.
Definition: fbshader.h:825
@ kFBShadowFrameTypeShadowCubeMap
Undocumented or unsupported.
Definition: fbshader.h:827
FB_FORWARD(FBViewingOptions)
FBRenderOptions.
#define __FB_FORWARD(ClassName)
Forwarding of class and typedef declaration.
Definition: fbtypes.h:68