Gorilla.Material.Terrain
Unit Gorilla.Material.Terrain.pasClasses
- TGorillaTerrainTexture = class ( TGorillaTexturePoolEntry )
- TGorillaTerrainTexturePool = class ( TGorillaTexturePool )
- TGorillaTerrainBitmap = class ( TGorillaBitmapPoolEntry )
- TGorillaTerrainBitmapPool = class ( TGorillaBitmapPool )
- TGorillaTerrainMaterial = class ( TGorillaDefaultMaterial )
- TGorillaTerrainMaterialSource = class ( TGorillaDefaultMaterialSource )
Constants
- const GORILLA_GLSL_DEFINE_TERRAINMAP : string = "TERRAINMAP";
TGorillaTerrainTexture
The terrain texture is a collection item with properties to configure rendering in the TGorillaTerrainMaterial shader.
Remarks
Because the shader renders specific textures on specific heights and handles smooth transitions between those, we need to have configuration possibilities.Ancestors
Members
Fields
- protected FMinHeight :
Single
- protected FMaxHeight :
Single
- protected FLowTransition :
Single
- protected FHighTransition :
Single
Methods
- public constructor Create ( ACollection : TCollection ) ;
- protected procedure AssignTo ( ADest : TPersistent ) ; override;
Properties
- published MinHeight : Single
Get or set the minimum height this texture is going to be rendered. The shader will consider the low-transition value to allow texture overlays.
read FMinHeight
write FMinHeight - published MaxHeight : Single
Get or set the maximum height this texture is going to be rendered. The shader will consider the high-transition value to allow texture overlays.
read FMaxHeight
write FMaxHeight - published LowTransition : Single
Get or set the lower transition ratio value. The larger this value is, the larger the texture transition area will get.
read FLowTransition
write FLowTransition - published HighTransition : Single
Get or set the upper transition ratio value. The larger this value is, the larger the texture transition area will get.
read FHighTransition
write FHighTransition
TGorillaTerrainTexturePool
Ancestors
TGorillaTerrainBitmap
The terrain bitmap is a collection item with properties to configure rendering in the TGorillaTerrainMaterial shader.
Remarks
Because the shader renders specific textures on specific heights and handles smooth transitions between those, we need to have configuration possibilities.Ancestors
Members
Fields
- protected FMinHeight :
Single
- protected FMaxHeight :
Single
- protected FLowTransition :
Single
- protected FHighTransition :
Single
Methods
- public constructor Create ( ACollection : TCollection ) ;
- protected procedure SetMinHeight ( AValue : Single ) ; virtual;
- protected procedure SetMaxHeight ( AValue : Single ) ; virtual;
- protected procedure SetLowTransition ( AValue : Single ) ; virtual;
- protected procedure SetHighTransition ( AValue : Single ) ; virtual;
- protected procedure AssignTo ( ADest : TPersistent ) ; override;
Properties
- published MinHeight : Single
Get or set the minimum height this texture is going to be rendered. The shader will consider the low-transition value to allow texture overlays.
read FMinHeight
write SetMinHeight - published MaxHeight : Single
Get or set the maximum height this texture is going to be rendered. The shader will consider the high-transition value to allow texture overlays.
read FMaxHeight
write SetMaxHeight - published LowTransition : Single
Get or set the lower transition ratio value. The larger this value is, the larger the texture transition area will get.
read FLowTransition
write SetLowTransition - published HighTransition : Single
Get or set the upper transition ratio value. The larger this value is, the larger the texture transition area will get.
read FHighTransition
write SetHighTransition
TGorillaTerrainBitmapPool
The terrain bitmap pool is a collection of bitmaps with settings for rendering those in the TGorillaTerrainMaterial shader.
Ancestors
TGorillaTerrainMaterial
The terrain material source provides a shader for rendering textures from a pool of sources depending on the vertex y-position.
Ancestors
Members
Methods
- public constructor Create ( const ASource : TGorillaDefaultMaterialSource ) ;
- public destructor Destroy ( ) ;
- protected procedure DoApply ( const Context : TContext3D ) ; override;
- protected procedure DoCreateTexturePool ( ) ; override;
- protected procedure DoCreateVertexShader ( ) ; override;
- protected procedure DoCreateFragmentShader ( ) ; override;
TGorillaTerrainMaterialSource
The terrain material source provides a shader for rendering textures from a pool of sources depending on the vertex y-position.
Remarks
Add multiple TGorillaTerrainBitmap instance to the bitmap pool by calling Bitmaps.Add() as TGorillaTerrainBitmap. You can then configure the min and max y-position, the low and high transition value and a tiling.
Ancestors
Members
Methods
- public constructor Create ( AOwner : TComponent ) ;
- public destructor Destroy ( ) ;
- protected procedure DoCreateBitmapPool ( ) ; override;
- protected function CreateMaterial ( ) : TMaterial ; override;
Properties
- published UseLighting : Boolean
- published UseSpecular : Boolean
- published UseTexturing : Boolean
- published UseTexture0 : Boolean
- published UseVertexColor : Boolean
- published UseColorClipping : Boolean
- published ShadingModel : TGorillaShadingModel
- published Diffuse : TAlphaColor
- published Emissive : TAlphaColor
- published Ambient : TAlphaColor
- published Specular : TAlphaColor
- published Shininess : Single
- published ClippingColor : TAlphaColor
- published NearLimit : Single
- published FarLimit : Single
- published Shadows : Boolean
- published ShadowMethod : TGorillaShadowMethod
- published DepthPass : TGorillaRenderPassController
- published Reflections : Boolean
- published ReflectionPass : TGorillaRenderPassController
- published ReflectionPower : Single
- published Refractions : Boolean
- published RefractionPass : TGorillaRenderPassController
- published RefractionPower : Single
- published Bitmaps : TGorillaBitmapPool