Gorilla.Material.BasicLight
Unit Gorilla.Material.BasicLight.pasClasses
- TGorillaBasicLightMaterial = class ( TCustomMaterial )
- TGorillaBasicLightMaterialSource = class ( TMaterialSource )
TGorillaBasicLightMaterial
Custom basic light material providing properties for color settings: diffuse, emissive, ambient and specular. The material allows to apply a texture, reflection and refraction render pass.
Ancestors
Members
Fields
- protected FSource :
TGorillaBasicLightMaterialSource
- protected FEmissive :
TAlphaColor
- protected FDiffuse :
TAlphaColor
- protected FAmbient :
TAlphaColor
- protected FSpecular :
TAlphaColor
- protected FShininess :
Single
- protected FReflectionPower :
Single
- protected FRefractionPower :
Single
- protected FTexture :
TTexture
- protected FReflection :
TTexture
- protected FRefraction :
TTexture
Methods
- public constructor Create ( const ASource : TGorillaBasicLightMaterialSource ) ;
- public destructor Destroy ( ) ;
- protected procedure SetTexture ( const Value : TTexture ) ;
- protected procedure SetReflection ( const Value : TTexture ) ;
- protected procedure SetRefraction ( const Value : TTexture ) ;
- protected procedure DoApply ( const Context : TContext3D ) ; override;
- protected procedure DoInitialize ( ) ; override;
Properties
- public Emissive : TAlphaColor
- public Diffuse : TAlphaColor
- public Ambient : TAlphaColor
- public Specular : TAlphaColor
- public Shininess : Single
- public Texture : TTexture
- public Reflection : TTexture
A reflection texture computed by a render pass. The reflection render pass needs to be applied to the parent material source.
read FReflection
write SetReflection - public ReflectionPower : Single
Defines the factor of mixing reflection with the basically computed color.
read FReflectionPower
write FReflectionPower - public Refraction : TTexture
A refraction texture computed by a render pass. The refraction render pass needs to be applied to the parent material source.
read FRefraction
write SetRefraction - public RefractionPower : Single
Defines the factor of mixing refraction with the basically computed color.
read FRefractionPower
write FRefractionPower
TGorillaBasicLightMaterialSource
Basic custom light material source with basic material information like: color settings (emissive, diffuse, specular, ambient, shininess) and texture settings (default texture, reflection texture, refraction texture)
Remarks
Do not use this material source. This is only a basis for extended materials. This material has no shader defined.Ancestors
Members
Fields
- protected FTexture :
TBitmap
- protected FContextResetOvrId :
Integer
- protected FReflectionPass :
TGorillaRenderPassController
- protected FRefractionPass :
TGorillaRenderPassController
Methods
- public constructor Create ( AOwner : TComponent ) ;
- public destructor Destroy ( ) ;
- protected function GetEmissive ( ) : TAlphaColor ;
- protected function GetAmbient ( ) : TAlphaColor ;
- protected function GetDiffuse ( ) : TAlphaColor ;
- protected function GetSpecular ( ) : TAlphaColor ;
- protected function GetShininess ( ) : Single ;
- protected function GetReflectionPower ( ) : Single ;
- protected function GetRefractionPower ( ) : Single ;
- protected procedure SetEmissive ( const Value : TAlphaColor ) ;
- protected procedure SetAmbient ( const Value : TAlphaColor ) ;
- protected procedure SetDiffuse ( const Value : TAlphaColor ) ;
- protected procedure SetSpecular ( const Value : TAlphaColor ) ;
- protected procedure SetShininess ( const Value : Single ) ;
- protected procedure SetReflectionPower ( const Value : Single ) ;
- protected procedure SetRefractionPower ( const Value : Single ) ;
- protected procedure SetTexture ( const Value : TBitmap ) ;
- protected procedure DoTextureChanged ( Sender : TObject ) ;
- protected procedure DoPassesChanged ( Sender : TObject ) ;
- protected procedure ContextResetHandlerOverride ( const Sender : TObject; const Msg : TMessageBase ) ; virtual;
- protected procedure SetReflectionPass ( const Value : TGorillaRenderPassController ) ;
- protected procedure SetRefractionPass ( const Value : TGorillaRenderPassController ) ;
- protected function CreateMaterial ( ) : TMaterial ; override;
Properties
- published Emissive : TAlphaColor
- published Diffuse : TAlphaColor
- published Ambient : TAlphaColor
- published Specular : TAlphaColor
- published Shininess : Single
- published Texture : TBitmap
- published ReflectionPass : TGorillaRenderPassController
Get reflection render pass or set reflection render pass to apply a reflection texture to material.
read FReflectionPass
write SetReflectionPass - published ReflectionPower : Single
Read or write reflection color mixing factor from / to material.
read GetReflectionPower
write SetReflectionPower - published RefractionPass : TGorillaRenderPassController
Get refraction render pass or set refraction render pass to apply a refraction texture to material.
read FRefractionPass
write SetRefractionPass - published RefractionPower : Single
Read or write refraction color mixing factor from / to material.
read GetRefractionPower
write SetRefractionPower