Gorilla.Material.Water
Unit Gorilla.Material.Water.pasClasses
- TGorillaWaterMaterial = class ( TGorillaDefaultMaterial )
- TGorillaWaterMaterialSource = class ( TGorillaDefaultMaterialSource )
TGorillaWaterMaterial
Default water material that creates a moving water effect by using different textures. It also needs applied reflection-, refraction- and depth-pass render passes.
Remarks
The shader needs a normal, dudv and specular texture for rendering. Also it needs applied reflection and refraction render passes. The refraction render pass automatically produces a depth map which the water shader needs.Ancestors
Members
Fields
- protected FStartTime :
Double
- protected FRenderTime :
Double
- protected FLastTime :
Double
- protected FMoveFactor :
Single
- protected FWaveSpeed :
Single
- protected FWaveSize :
Single
- protected FReflCorrection :
TVector3D
- protected FRefrCorrection :
TVector3D
- protected FDUDVTexture :
TTexture
- protected FFoamTexture :
TTexture
Methods
- public constructor Create ( const ASource : TGorillaDefaultMaterialSource ) ;
- public destructor Destroy ( ) ;
- protected procedure SetDUDVTexture ( const Value : TTexture ) ;
- protected procedure SetFoamTexture ( const Value : TTexture ) ;
- protected procedure DoCreateTexturePool ( ) ; override;
- protected procedure DoCreateVertexShader ( ) ; override;
- protected procedure DoSetupVertexShader ( ) ; override;
- protected procedure DoCreateFragmentShader ( ) ; override;
- protected procedure DoSetupFragmentShader ( ) ; override;
- protected procedure DoApply ( const Context : TContext3D ) ; override;
Properties
- public WaveSpeed : Single
- public WaveSize : Single
- public ReflCorrection : TVector3D
The reflection correction value allowes to influence reflective color on water surface.
read FReflCorrection
write FReflCorrection - public RefrCorrection : TVector3D
The refraction correction value allowes to influence refractive color on water surface.
read FRefrCorrection
write FRefrCorrection - public DUDVTexture : TTexture
- public FoamTexture : TTexture
TGorillaWaterMaterialSource
Basic water material source.
Remarks
Shader was built on basis of a GLSL conversion of Michael Horsch water demo http://www.bonzaisoftware.com/wfs.html Converted by Mars_999 8/20/2005 http://forum.bonzaisoftware.com/viewthread.php?tid=10Ancestors
Members
Fields
- protected FDUDVTexture :
TGorillaBitmapPoolEntry
- protected FFoamTexture :
TGorillaBitmapPoolEntry
- protected FSpecularMapTexture :
TGorillaBitmapPoolEntry
Methods
- public constructor Create ( AOwner : TComponent ) ;
- public destructor Destroy ( ) ;
- protected function GetWaveSpeed ( ) : Single ;
- protected procedure SetWaveSpeed ( AValue : Single ) ;
- protected function GetWaveSize ( ) : Single ;
- protected procedure SetWaveSize ( AValue : Single ) ;
- protected function GetReflCorrection ( ) : TVector3D ;
- protected procedure SetReflCorrection ( AValue : TVector3D ) ;
- protected function GetRefrCorrection ( ) : TVector3D ;
- protected procedure SetRefrCorrection ( AValue : TVector3D ) ;
- protected function GetDUDVTexture ( ) : TBitmap ;
- protected procedure SetDUDVTexture ( const Value : TBitmap ) ;
- protected function GetFoamTexture ( ) : TBitmap ;
- protected procedure SetFoamTexture ( const Value : TBitmap ) ;
- protected function GetSpecularMap ( ) : TBitmap ;
- protected procedure SetSpecularMap ( const AValue : TBitmap ) ;
- protected function CreateMaterial ( ) : TMaterial ; override;
- protected procedure Loaded ( ) ; override;
- protected function ( ) : TBitmap ; virtual;
- protected procedure ( const AValue : TBitmap ) ; virtual;
- protected function ( ) : TVector3D ; virtual;
- protected procedure ( const AValue : TVector3D ) ; virtual;
- protected function ( ) : TBitmap ; virtual;
- protected procedure ( const AValue : TBitmap ) ; virtual;
Properties
- published WaveSpeed : Single
- published WaveSize : Single
- published ReflCorrection : TVector3D
The reflection correction value allowes to influence reflective color on water surface.
read GetReflCorrection
write SetReflCorrection - published RefrCorrection : TVector3D
The refraction correction value allowes to influence refractive color on water surface.
read GetRefrCorrection
write SetRefrCorrection - published FoamTexture : TBitmap
- published DUDVTexture : TBitmap
- published NormalMap : TBitmap
Get or set normal map texture for wave computation.
- published SpecularMap : TBitmap
Get or set the specular map texture to manage specular color.
read GetSpecularMap
write SetSpecularMap - published Displacement : TVector3D
- published DisplacementMap : TBitmap