Gorilla.Material.Types
Unit Gorilla.Material.Types.pasClasses
- TGorillaTexturePoolEntry = class ( TCollectionItem )
- TGorillaTexturePool = class ( TOwnedCollection )
- TGorillaBitmapPoolEntry = class ( TCollectionItem )
- TGorillaBitmapPool = class ( TOwnedCollection )
Records
- record TInputVariable
- record TTextureListEntry
- record TAlphaColorHelper
Enumerations
- enum TInputVariableType = ( ivtDefault, ivtInternal, ivtReference ) ;
- enum TGorillaShadowMethod = ( ShadowMapping, VarianceShadowMapping ) ;
Constants
- const GORILLA_MATERIAL_TEXTURE_0 : string = "Texture0";
- const GORILLA_MATERIAL_TEXTURE_SPECULARMAP : string = "SpecularMapTexture";
- const GORILLA_MATERIAL_TEXTURE_NORMALMAP : string = "NormalMapTexture";
- const GORILLA_MATERIAL_TEXTURE_POM : string = "POMTexture";
- const GORILLA_MATERIAL_TEXTURE_DISPLACEMENTMAP : string = "DisplacementMapTexture";
- const GORILLA_MATERIAL_TEXTURE_DEPTH : string = "DepthTexture";
- const GORILLA_MATERIAL_TEXTURE_REFLECTION : string = "ReflectionTexture";
- const GORILLA_MATERIAL_TEXTURE_REFRACTION : string = "RefractionTexture";
- const GORILLA_MATERIAL_TEXTURE_ENVIRONMENT : string = "EnvironmentTexture";
- const GORILLA_MATERIAL_TEXTURE_VOXELGEOMETRY : string = "VoxelGeometry";
- const GORILLA_MATERIAL_TEXTURE_METALNESS : string = "MetalnessTexture";
- const GORILLA_MATERIAL_TEXTURE_ROUGHNESS : string = "RoughnessTexture";
- const GORILLA_MATERIAL_TEXTURE_AO : string = "AmbientOcclusionTexture";
- const GORILLA_MATERIAL_TEXTURE_EMISSIVE : string = "EmissiveTexture";
- const GORILLA_MATERIAL_TEXTURE_SPECULAR : string = "SpecularMapTexture";
- const GORILLA_MATERIAL_TEXTURE_SHADOWMAP_X : string = "ShadowMapTexture";
- const GORILLA_MATERIAL_TEXTURE_SHADOWMAP_0 : string = "ShadowMapTexture0";
- const GORILLA_MATERIAL_TEXTURE_SHADOWMAP_1 : string = "ShadowMapTexture1";
- const GORILLA_MATERIAL_TEXTURE_SHADOWMAP_2 : string = "ShadowMapTexture2";
- const GORILLA_MATERIAL_TEXTURE_SHADOWMAP_3 : string = "ShadowMapTexture3";
- const GORILLA_MATERIAL_TEXTURE_SHADOWMAP_4 : string = "ShadowMapTexture4";
- const GORILLA_MATERIAL_TEXTURE_SHADOWMAP_5 : string = "ShadowMapTexture5";
- const GORILLA_MATERIAL_TEXTURE_SHADOWMAP_6 : string = "ShadowMapTexture6";
- const GORILLA_MATERIAL_TEXTURE_SHADOWMAP_7 : string = "ShadowMapTexture7";
- const GORILLA_MATERIAL_TEXTURE_GEOMETRY_X : string = "GeometryTexture";
- const GORILLA_MATERIAL_TEXTURE_GEOMETRY_FRONT : string = "GeometryTexture0";
- const GORILLA_MATERIAL_TEXTURE_GEOMETRY_BACK : string = "GeometryTexture1";
- const GORILLA_MATERIAL_TEXTURE_GEOMETRY_LEFT : string = "GeometryTexture2";
- const GORILLA_MATERIAL_TEXTURE_GEOMETRY_RIGHT : string = "GeometryTexture3";
- const GORILLA_MATERIAL_TEXTURE_GEOMETRY_TOP : string = "GeometryTexture4";
- const GORILLA_MATERIAL_TEXTURE_GEOMETRY_BOTTOM : string = "GeometryTexture5";
- const GORILLA_INPUTVAR_INTERNAL_MVPMATRIX : string = "ModelViewProjMatrix";
- const GORILLA_INPUTVAR_INTERNAL_MVPMATRIX_IT : string = "ModelViewProjMatrixIT";
- const GORILLA_INPUTVAR_INTERNAL_MODELMATRIX : string = "ModelMatrix";
- const GORILLA_INPUTVAR_INTERNAL_MODELMATRIX_IT : string = "ModelMatrixIT";
- const GORILLA_INPUTVAR_INTERNAL_EYEPOS : string = "EyePos";
- const GORILLA_INPUTVAR_INTERNAL_CAMERA : string = "CameraMatrix";
- const GORILLA_INPUTVAR_INTERNAL_INVCAMERA : string = "CameraMatrixInv";
- const GORILLA_INPUTVAR_INTERNAL_PROJECT : string = "ProjectionMatrix";
- const GORILLA_INPUTVAR_INTERNAL_SCREEN : string = "ScreenMatrix";
- const GORILLA_MATERIAL_INPUTNAME_DEPTH : string = "DepthTexture";
- const GORILLA_MATERIAL_INPUTNAME_REFLECTION : string = "ReflectionTexture";
- const GORILLA_MATERIAL_INPUTNAME_REFRACTION : string = "RefractionTexture";
- const GORILLA_MATERIAL_INPUTNAME_ENVIRONMENT : string = "EnvironmentTexture";
- const GORILLA_MATERIAL_INPUTNAME_VOXELGEOMETRY : string = "VoxelGeometry";
- const GORILLA_MATERIAL_INPUTNAME_GEOMETRY : string = "GeometryTexture";
- const GORILLA_MATERIAL_INPUTNAME_SHADOWMAPX : string = "ShadowMapTexture%%d";
- const GORILLA_MATERIAL_INPUTNAME_SHADOWMAP0 : string = "ShadowMapTexture0";
- const GORILLA_MATERIAL_INPUTNAME_SHADOWMAP1 : string = "ShadowMapTexture1";
- const GORILLA_MATERIAL_INPUTNAME_SHADOWMAP2 : string = "ShadowMapTexture2";
- const GORILLA_MATERIAL_INPUTNAME_SHADOWMAP3 : string = "ShadowMapTexture3";
- const GORILLA_MATERIAL_INPUTNAME_SHADOWMAP4 : string = "ShadowMapTexture4";
- const GORILLA_MATERIAL_INPUTNAME_SHADOWMAP5 : string = "ShadowMapTexture5";
- const GORILLA_MATERIAL_INPUTNAME_SHADOWMAP6 : string = "ShadowMapTexture6";
- const GORILLA_MATERIAL_INPUTNAME_SHADOWMAP7 : string = "ShadowMapTexture7";
- const GORILLA_SHADERDATA_OPTION_CLIPPLANE : Integer = $1;
- const GORILLA_SHADERDATA_OPTION_TRANSLUCENT : Integer = $2;
Mics. types
- type PInputVariable = pointer to TInputVariable;
- type PTextureListEntry = pointer to TTextureListEntry;
- type TContextShaderVariableDynArray = array of TContextShaderVariable;
Functions / Procedures
TInputVariableType
TGorillaTexturePoolEntry
Representing an entry inside of a TGorillaTexturePool collection, to easily store multiple textures and not to declare each texture hardcoded in the material class.
Ancestors
Members
Fields
- protected FName :
string
- protected FTiling :
TPointF
- protected FTexture :
TTexture
- protected FIsDynamic :
Boolean
- protected FIgnoreInArray :
Boolean
- protected FShaderKind :
TContextShaderKind
- protected FTextureKind :
TGorillaTextureKind
- protected FInternalFormat :
TPixelFormatEx
- protected FFormat :
TPixelFormatEx
- protected FDataType :
TGorillaTextureDataType
- protected FWrapping :
- protected FMinMagFilter :
- protected FBorderColor :
TAlphaColorF
Methods
- public constructor Create ( ACollection : TCollection ) ;
- public destructor Destroy ( ) ;
- protected function GetDisplayName ( ) : string ; override;
- protected procedure SetDisplayName ( const AValue : string ) ; override;
- protected function GetBorderColor ( ) : TAlphaColor ; virtual;
- protected procedure SetBorderColor ( const AValue : TAlphaColor ) ; virtual;
- protected procedure AssignTo ( ADest : TPersistent ) ; override;
- public procedure SetPixelFormat ( const ATextureKind : TGorillaTextureKind; const AComps : TPixelFormatEx; AFormat : TPixelFormatEx; ADataType : TGorillaTextureDataType ) ; virtual;
Properties
- public TextureKind : TGorillaTextureKindread FTextureKind
- public BorderColor : TAlphaColor
- published Tiling : TPointF
- published Texture : TTexture
- published IsDynamic : Boolean
Get or set if this texture comes from runtime / production content. This is used for depth, reflection and refraction textures, which will be generated by a separated render pass.
read FIsDynamic
write FIsDynamic - published IgnoreInArray : Boolean
If in TGorillaTexturePool "DeclareAsArray" is set to TRUE, we can influence by this property if the texture will be included in the texture pool array.
read FIgnoreInArray
write FIgnoreInArray - published ShaderKind : TContextShaderKind
TGorillaTexturePool
Defines a default collection pool for texture references. This component should be used in a TMaterial instance in combination with TGorillaBitmapPool instance in the corresponding TMaterialSource.
Ancestors
Members
TGorillaBitmapPoolEntry
Representing a texture bitmap pool entry, to easily store multiple bitmaps without declaring each in the materialsource class. This is the basis for the runtime shader material to build scriptable shaders by a designer.
Ancestors
Members
Fields
- protected FName :
string
- protected FTiling :
TPointF
- protected FBitmap :
TGorillaTextureBitmap
- protected FIsDynamic :
Boolean
- protected FIgnoreInArray :
Boolean
- protected FShaderKind :
TContextShaderKind
- protected FTextureKind :
TGorillaTextureKind
- protected FInternalFormat :
TPixelFormatEx
- protected FFormat :
TPixelFormatEx
- protected FDataType :
TGorillaTextureDataType
- protected FWrapping :
- protected FMinMagFilter :
- protected FBorderColor :
TAlphaColorF
- protected FProtectFormatSettings :
Boolean
Methods
- public constructor Create ( ACollection : TCollection ) ;
- public destructor Destroy ( ) ;
- protected function GetDisplayName ( ) : string ; override;
- protected procedure SetDisplayName ( const AValue : string ) ; override;
- protected procedure SetTiling ( const AValue : TPointF ) ; virtual;
- protected procedure SetBitmap ( const AValue : TGorillaTextureBitmap ) ; virtual;
- protected function GetTilingPart ( AIndex : Integer ) : Single ; virtual;
- protected procedure SetTilingPart ( AIndex : Integer; AValue : Single ) ; virtual;
- protected function GetTextureKind ( ) : TGorillaTextureKind ; virtual;
- protected procedure SetTextureKind ( const AValue : TGorillaTextureKind ) ; virtual;
- protected function GetFormat ( ) : TPixelFormatEx ; virtual;
- protected procedure SetFormat ( const AValue : TPixelFormatEx ) ; virtual;
- protected function GetInternalFormat ( ) : TPixelFormatEx ; virtual;
- protected procedure SetInternalFormat ( const AValue : TPixelFormatEx ) ; virtual;
- protected function GetDataType ( ) : TGorillaTextureDataType ; virtual;
- protected procedure SetDataType ( const AValue : TGorillaTextureDataType ) ; virtual;
- protected function GetWrapS ( ) : TGorillaTextureWrap ; virtual;
- protected procedure SetWrapS ( const AValue : TGorillaTextureWrap ) ; virtual;
- protected function GetWrapT ( ) : TGorillaTextureWrap ; virtual;
- protected procedure SetWrapT ( const AValue : TGorillaTextureWrap ) ; virtual;
- protected function GetWrapR ( ) : TGorillaTextureWrap ; virtual;
- protected procedure SetWrapR ( const AValue : TGorillaTextureWrap ) ; virtual;
- protected function GetMinFilter ( ) : TTextureFilter ; virtual;
- protected procedure SetMinFilter ( const AValue : TTextureFilter ) ; virtual;
- protected function GetMagFilter ( ) : TTextureFilter ; virtual;
- protected procedure SetMagFilter ( const AValue : TTextureFilter ) ; virtual;
- protected function GetBorderColor ( ) : TAlphaColor ; virtual;
- protected procedure SetBorderColor ( const AValue : TAlphaColor ) ; virtual;
- protected procedure AssignTo ( ADest : TPersistent ) ; override;
- protected procedure DoOnBitmapChanged ( ASender : TObject ) ; virtual;
- public procedure GetPixelFormat ( out AComps : TPixelFormatEx; out AFormat : TPixelFormatEx; out ADataType : TGorillaTextureDataType ) ; virtual;
- public procedure SetPixelFormat ( const ATextureKind : TGorillaTextureKind; const AComps : TPixelFormatEx; AFormat : TPixelFormatEx; ADataType : TGorillaTextureDataType; AProtectFormatSettings : Boolean ) ; virtual;
- public procedure SetPixelFormatNoUpdate ( const ATextureKind : TGorillaTextureKind; const AComps : TPixelFormatEx; AFormat : TPixelFormatEx; ADataType : TGorillaTextureDataType; AProtectFormatSettings : Boolean ) ; virtual;
- public procedure SetTextureWrapping ( const AWrap : TGorillaTextureWrap ) ; overload;
- public procedure SetTextureWrapping ( const AWrapS : TGorillaTextureWrap; const AWrapT : TGorillaTextureWrap; const AWrapR : TGorillaTextureWrap ) ; overload;
- public procedure SetTextureMinMagFilter ( const AMin : TTextureFilter; const AMag : TTextureFilter ) ;
- public procedure SetExtendedProperties ( const AWrapS : TGorillaTextureWrap; const AWrapT : TGorillaTextureWrap; const AWrapR : TGorillaTextureWrap; const AMin : TTextureFilter; const AMag : TTextureFilter; ABorder : TAlphaColor = $0 ; AStyles : TTextureStyles = [] ) ;
Properties
- public Tiling : TPointF
- published Name : string
Get or set the display name of a bitmap pool entry (equivalent to public DisplayName field).
read GetDisplayName
write SetDisplayName - published TilingX : Single
- published TilingY : Single
- published IsDynamic : Boolean
Get or set if this texture comes from runtime / production content. This is used for depth, reflection and refraction textures, which will be generated by a separated render pass.
read FIsDynamic
write FIsDynamic - published IgnoreInArray : Boolean
If in TGorillaBitmapPool "DeclareAsArray" is set to TRUE, we can influence by this property if the texture will be included in the texture pool array.
read FIgnoreInArray
write FIgnoreInArray - published ShaderKind : TContextShaderKind
- published TextureKind : TGorillaTextureKind
- published Format : TPixelFormatEx
- published InternalFormat : TPixelFormatEx
- published DataType : TGorillaTextureDataType
- published WrapS : TGorillaTextureWrap
- published WrapT : TGorillaTextureWrap
- published WrapR : TGorillaTextureWrap
- published MinFilter : TTextureFilter
- published MagFilter : TTextureFilter
- published BorderColor : TAlphaColor
- published ProtectFormatSettings : Boolean
Because bitmaps created by FMX are always of BGRA format, we need the opportunity to protect Gorilla3D-bitmaps from modifying the format, when assigning from FMX-bitmap. Otherwise different format settings will appear.
read FProtectFormatSettings
write FProtectFormatSettings - published Bitmap : TGorillaTextureBitmap
TGorillaBitmapPool
Defines a default collection pool for texture bitmaps. This component should be used in a TMaterialSource instance in combination with TGorillaTexturePool instance in the corresponding TMaterial.
Ancestors
Members
Fields
Methods
Properties
- published DeclareAsArray : Boolean
Textures will be declared in a texture array, excepting dynamic texture like depth, reflection, refraction, ...
read FDeclareAsArray
write FDeclareAsArray