Gorilla.Material.Lambert
Unit Gorilla.Material.Lambert.pasClasses
- TGorillaLambertMaterial = class ( TGorillaDefaultMaterial )
- TGorillaLambertMaterialSource = class ( TGorillaDefaultMaterialSource )
Constants
- const GORILLA_LAMBERT_VS_DECL : string = "uniform mat4 _ReflectTextureMatrix;uniform mat4 _RefractTextureMatrix;varying vec4 v_ReflProjTextureCoords;varying vec4 v_RefrProjTextureCoords;";
- const GORILLA_LAMBERT_VS_MAIN : string = "v_ReflProjTextureCoords = _ReflectTextureMatrix * _ModelMatrix * LOCALS.Position; v_RefrProjTextureCoords = _RefractTextureMatrix * _ModelMatrix * LOCALS.Position;";
- const GORILLA_LAMBERT_FS_PASSES : string = "if(_ReflectionPower > 0.0){ vec4 l_ReflTex = tex2DProj(_ReflectionTexture, v_ReflProjTextureCoords); texColor = mix(texColor, l_ReflTex, _ReflectionPower); } if(_RefractionPower > 0.0){ vec4 l_RefrTex = tex2DProj(_RefractionTexture, v_RefrProjTextureCoords); texColor = mix(texColor, l_RefrTex, _RefractionPower); }";
- const GORILLA_LAMBERT_FS_OPACITY : string = "if(_Opacity < 0.99999){ texColor = vec4(texColor.rgb, texColor.a * _Opacity); }";
TGorillaLambertMaterial
Lambertian reflectance is the property that defines an ideal "matte" or diffusely reflecting surface. The apparent brightness of a Lambertian surface to an observer is the same regardless of the observer's angle of view. (https://en.wikipedia.org/wiki/Lambertian_reflectance)
Remarks
More technically, the surface's luminance is isotropic, and the luminous intensity obeys Lambert's cosine law. Lambertian reflectance is named after Johann Heinrich Lambert, who introduced the concept of perfect diffusion in his 1760 book Photometria. The material allows to configure used color channels: all-colors, only-ambient, only-diffuse, only-specular.Ancestors
Members
TGorillaLambertMaterialSource
Lambertian reflectance is the property that defines an ideal "matte" or diffusely reflecting surface. The apparent brightness of a Lambertian surface to an observer is the same regardless of the observer's angle of view. (https://en.wikipedia.org/wiki/Lambertian_reflectance)
Remarks
More technically, the surface's luminance is isotropic, and the luminous intensity obeys Lambert's cosine law. Lambertian reflectance is named after Johann Heinrich Lambert, who introduced the concept of perfect diffusion in his 1760 book Photometria. The material allows to configure used color channels: all-colors, only-ambient, only-diffuse, only-specular.Ancestors
Members
Methods
- public constructor Create ( AOwner : TComponent ) ;
- public destructor Destroy ( ) ;
- 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 Texture : TBitmap
- 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