Gorilla.Renderer
Unit Gorilla.Renderer.pasClasses
- TRenderer = class ( TObject )
- TLegacyRenderer = class ( TRenderer )
- TCompositeRenderer = class ( TRenderer )
- TForwardRenderer = class ( TCompositeRenderer )
- TDeferredRenderer = class ( TCompositeRenderer )
Enumerations
- enum TRendererType = ( ForwardRenderer, LegacyRenderer ) ;
- enum TRendererFlag = ( IgnoreRenderTargets, IgnoreCompositeCtrl ) ;
Constants
TRenderer
Basis renderer class for all types of renderer.
Ancestors
Members
Fields
- protected FId :
string
- protected FFlags :
TRendererFlags
- protected FMultisample :
TMultisample
- protected FSharedContext :
TContext3D
- protected FRenderTargets :
TRenderTargets
- protected FCompositeTexture :
TGorillaTextureBitmap
- protected FOwner :
TComponent
- protected FSize :
TPoint
- protected FScale :
Single
- protected FColor :
TAlphaColorF
- protected FOnCreateCompositeTexture :
TOnRendererCreateCompositeTexture
Methods
- public constructor Create ( AId : string; AOwner : TComponent; AFlags : TRendererFlags = [] ; ACompositeTextureEvent : TOnRendererCreateCompositeTexture = nil ) ;
- public destructor Destroy ( ) ;
- protected function GetDefaultFrameBuf ( ) : TFrameBufferObject ;
- protected function GetTranslucentBuf ( ) : TFrameBufferObject ;
- protected procedure SetSize ( const AValue : TPoint ) ; virtual;
- protected procedure SetScale ( const AValue : Single ) ; virtual;
- protected procedure DoResize ( const ASize : TPoint; const AScale : Single ) ; virtual;
- protected procedure DoCreateContext ( ) ; virtual;
- protected procedure DoDestroyContext ( ) ;
- protected function DoCreateCompositeTexture ( ) : TTexture ; virtual;
- protected procedure DoCreateTextures ( ) ; virtual;
- protected procedure DoDestroyTextures ( AIsDestructing : Boolean ) ; virtual;
- protected procedure DoApply ( ) ; virtual;
- public procedure Resize ( const ASize : TPoint; const AScale : Single ) ;
- public procedure Apply ( ) ; virtual;
- public procedure Reset ( ) ; virtual;
- public procedure BeginMainRenderPass ( ACamera : TMatrix3D; AAngleOfView : Single ) ; virtual;
- public procedure EndMainRenderPass ( ) ; virtual;
- public function BeginOpaqueRendering ( ) : Boolean ; virtual;
- public procedure EndOpaqueRendering ( ) ; virtual;
- public function BeginTranslucentRendering ( ) : Boolean ; virtual;
- public procedure EndTranslucentRendering ( ) ; virtual;
Properties
- public Id : stringread FId
- public Flags : TRendererFlagsread FFlags
- public SharedContext : TContext3Dread FSharedContext
- public CompositeTexture : TGorillaTextureBitmapread FCompositeTexture
- public RenderTargets : TRenderTargets
- public Owner : TComponent
- public Size : TPoint
- public Scale : Single
- public Color : TAlphaColorF
- public DefaultFrameBuf : TFrameBufferObjectread GetDefaultFrameBuf
- public TranslucentBuf : TFrameBufferObjectread GetTranslucentBuf
TLegacyRenderer
Ancestors
Members
Methods
- public constructor Create ( AId : string; AOwner : TComponent; AFlags : TRendererFlags = [] ; ACompositeTextureEvent : TOnRendererCreateCompositeTexture = nil ) ;
- public destructor Destroy ( ) ;
- protected function DoCreateCompositeTexture ( ) : TTexture ; override;
- public procedure BeginMainRenderPass ( ACamera : TMatrix3D; AAngleOfView : Single ) ; override;
- public procedure EndMainRenderPass ( ) ; override;
- public function BeginOpaqueRendering ( ) : Boolean ; override;
- public procedure EndOpaqueRendering ( ) ; override;
- public function BeginTranslucentRendering ( ) : Boolean ; override;
- public procedure EndTranslucentRendering ( ) ; override;
TCompositeRenderer
Basis renderer for forward and deferred renderer with WBOIT 3-phase rendering.
Ancestors
Members
Fields
- protected FAlbedoTexture :
TTexture
- protected FTranslucentAlbedoTexture :
TTexture
- protected FAlphaTexture :
TTexture
- protected FPositionTexture :
TTexture
- protected FNormalsTexture :
TTexture
- protected FDeferredCompositeCtrl :
TObject
- protected FDeferredCompositePass :
TRenderPass
- protected FTranslucentDistance :
Single
- protected FSaturation :
TPoint3D
Methods
- public constructor Create ( AId : string; AOwner : TComponent; AFlags : TRendererFlags = [] ; ACompositeTextureEvent : TOnRendererCreateCompositeTexture = nil ) ;
- public destructor Destroy ( ) ;
- protected procedure DoResize ( const ASize : TPoint; const AScale : Single ) ; override;
- protected procedure DoCreateContext ( ) ; override;
- protected procedure DoCreateTextures ( ) ; override;
- protected procedure DoDestroyTextures ( AIsDestructing : Boolean ) ; override;
- protected function GetTranslucentDistance ( ) : Single ;
- protected procedure SetTranslucentDistance ( const AValue : Single ) ;
- protected function GetSaturation ( ) : TPoint3D ;
- protected procedure SetSaturation ( const AValue : TPoint3D ) ;
- public function BeginOpaqueRendering ( ) : Boolean ; override;
- public procedure EndOpaqueRendering ( ) ; override;
- public procedure Composite ( const ARenderContext : PRenderContext ) ; virtual;
Properties
- public AlbedoTexture : TTextureread FAlbedoTexture
- public TranslucentAlbedoTexture : TTexture
- public AlphaTexture : TTextureread FAlphaTexture
- public PositionTexture : TTextureread FPositionTexture
- public NormalsTexture : TTextureread FNormalsTexture
- public DeferredCompositeCtrl : TObject
- public TranslucentDistance : Single
Get or set translucent distance value used for weighting colors depending on their eye-vertex distance. The closer a pixel is, the bigger it weighted. By changing the distance value you can modify weight depending on your scene.
read GetTranslucentDistance
write SetTranslucentDistance - public Saturation : TPoint3D
Get or set saturation values applied while color merging. The 3D vector property contains of 3 parts for opaque, translucent and composite saturation. This allows you to fully control each part of the rendering. If value is zero no saturation algorithm will be applied to the specific part.
read GetSaturation
write SetSaturation
TForwardRenderer
The old forward renderer with simple albedo, translucent-albedo and alpha texture.
Ancestors
Members
TDeferredRenderer
The new deferred renderer with multiple color channels combined together in a final composite render pass (embedded).
Ancestors
Members
Fields
- protected FComponentsTexture :
TTexture
- protected FAmbientTexture :
TTexture
- protected FEmissiveTexture :
TTexture
- protected FSpecularTexture :
TTexture
Methods
- public constructor Create ( AId : string; AOwner : TComponent; AFlags : TRendererFlags = [] ; ACompositeTextureEvent : TOnRendererCreateCompositeTexture = nil ) ;
- public destructor Destroy ( ) ;
- protected procedure DoResize ( const ASize : TPoint; const AScale : Single ) ; override;
- protected procedure DoCreateTextures ( ) ; override;
- protected procedure DoDestroyTextures ( AIsDestructing : Boolean ) ; override;
- protected procedure DoApply ( ) ; override;
- public procedure Composite ( const ARenderContext : PRenderContext ) ; override;