Gorilla.Material.Lambert

Unit Gorilla.Material.Lambert.pas

Classes

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 * l_Position; v_RefrProjTextureCoords = _RefractTextureMatrix * _ModelMatrix * l_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

Properties