Class TPhongMaterialInfo
Unit
Declaration
type TPhongMaterialInfo = class(TMaterialInfo)
Description
Material information that defines parameters for Phong lighting equations. This hides differences between various material nodes, like TMaterialNode and TCommonSurfaceShaderNode.
Source: src/scene/x3d/x3dnodes_utils_materials.inc (line 88).
Hierarchy
- TObject
- TMaterialInfo
- TPhongMaterialInfo
Overview
Fields
![]() |
nested const DefaultAmbientColor: TVector3 = (X: 0.2; Y: 0.2; Z: 0.2); |
![]() |
nested const DefaultAmbientIntensity = 0.2; |
![]() |
nested const DefaultDiffuseColor: TVector3 = (X: 0.8; Y: 0.8; Z: 0.8); |
![]() |
nested const DefaultSpecularColor: TVector3 = (X: 0; Y: 0; Z: 0); |
![]() |
nested const DefaultEmissiveColor: TVector3 = (X: 0; Y: 0; Z: 0); |
![]() |
nested const DefaultShininess = 0.2; |
![]() |
nested const DefaultShininessExp = DefaultShininess * 128; |
![]() |
nested const DefaultReflectionColor: TVector3 = (X: 0; Y: 0; Z: 0); |
![]() |
nested const DefaultTransmissionColor: TVector3 = (X: 0; Y: 0; Z: 0); |
![]() |
nested const DefaultReflSpecularExp = 1000000; |
![]() |
nested const DefaultTransSpecularExp = 1000000; |
Methods
![]() |
function GetDiffuseColor: TVector3; virtual; abstract; |
![]() |
procedure SetDiffuseColor(const Value: TVector3); virtual; abstract; |
![]() |
function GetSpecularColor: TVector3; virtual; abstract; |
![]() |
procedure SetSpecularColor(const Value: TVector3); virtual; abstract; |
![]() |
function GetMainColor: TVector3; override; |
![]() |
procedure SetMainColor(const Value: TVector3); override; |
![]() |
function AmbientColor: TVector3; virtual; abstract; |
![]() |
function PureEmissive: boolean; deprecated 'use TUnlitMaterialNode for unlit materials'; |
![]() |
function Shininess: Single; virtual; abstract; |
![]() |
function ShininessExp: Single; |
![]() |
function ReflectionColor: TVector3; virtual; abstract; |
![]() |
function TransmissionColor: TVector3; virtual; |
![]() |
function ReflSpecular: TVector3; virtual; |
![]() |
function ReflDiffuse: TVector3; virtual; |
![]() |
function TransSpecular: TVector3; virtual; |
![]() |
function TransDiffuse: TVector3; virtual; |
![]() |
function ReflSpecularExp: Single; virtual; |
![]() |
function TransSpecularExp: Single; virtual; |
Properties
![]() |
property DiffuseColor: TVector3 read GetDiffuseColor write SetDiffuseColor; |
![]() |
property SpecularColor: TVector3 read GetSpecularColor write SetSpecularColor; |
Description
Fields
![]() |
nested const DefaultAmbientColor: TVector3 = (X: 0.2; Y: 0.2; Z: 0.2); |
|
Default material parameters. They luckily match between all the material-like nodes:
The AmbientColor is an exception. In X3D the effective AmbientColor is an AmbientIntensity * DiffuseColor, thus it has a default value of Source: src/scene/x3d/x3dnodes_utils_materials.inc (line 114). | |
![]() |
nested const DefaultAmbientIntensity = 0.2; |
|
This item has no description. Source: src/scene/x3d/x3dnodes_utils_materials.inc (line 115). | |
![]() |
nested const DefaultDiffuseColor: TVector3 = (X: 0.8; Y: 0.8; Z: 0.8); |
|
This item has no description. Source: src/scene/x3d/x3dnodes_utils_materials.inc (line 116). | |
![]() |
nested const DefaultSpecularColor: TVector3 = (X: 0; Y: 0; Z: 0); |
|
This item has no description. Source: src/scene/x3d/x3dnodes_utils_materials.inc (line 117). | |
![]() |
nested const DefaultEmissiveColor: TVector3 = (X: 0; Y: 0; Z: 0); |
|
This item has no description. Source: src/scene/x3d/x3dnodes_utils_materials.inc (line 118). | |
![]() |
nested const DefaultShininess = 0.2; |
|
This item has no description. Source: src/scene/x3d/x3dnodes_utils_materials.inc (line 119). | |
![]() |
nested const DefaultShininessExp = DefaultShininess * 128; |
|
This item has no description. Source: src/scene/x3d/x3dnodes_utils_materials.inc (line 120). | |
![]() |
nested const DefaultReflectionColor: TVector3 = (X: 0; Y: 0; Z: 0); |
|
This item has no description. Source: src/scene/x3d/x3dnodes_utils_materials.inc (line 121). | |
![]() |
nested const DefaultTransmissionColor: TVector3 = (X: 0; Y: 0; Z: 0); |
|
This item has no description. Source: src/scene/x3d/x3dnodes_utils_materials.inc (line 122). | |
![]() |
nested const DefaultReflSpecularExp = 1000000; |
|
This item has no description. Source: src/scene/x3d/x3dnodes_utils_materials.inc (line 123). | |
![]() |
nested const DefaultTransSpecularExp = 1000000; |
|
This item has no description. Source: src/scene/x3d/x3dnodes_utils_materials.inc (line 124). | |
Methods
![]() |
function GetDiffuseColor: TVector3; virtual; abstract; |
|
This item has no description. Source: src/scene/x3d/x3dnodes_utils_materials.inc (line 90). | |
![]() |
procedure SetDiffuseColor(const Value: TVector3); virtual; abstract; |
|
This item has no description. Source: src/scene/x3d/x3dnodes_utils_materials.inc (line 91). | |
![]() |
function GetSpecularColor: TVector3; virtual; abstract; |
|
This item has no description. Source: src/scene/x3d/x3dnodes_utils_materials.inc (line 92). | |
![]() |
procedure SetSpecularColor(const Value: TVector3); virtual; abstract; |
|
This item has no description. Source: src/scene/x3d/x3dnodes_utils_materials.inc (line 93). | |
![]() |
function GetMainColor: TVector3; override; |
|
Main color of Phong material is DiffuseColor. Source: src/scene/x3d/x3dnodes_utils_materials.inc (line 95). | |
![]() |
procedure SetMainColor(const Value: TVector3); override; |
|
This item has no description. Source: src/scene/x3d/x3dnodes_utils_materials.inc (line 96). | |
![]() |
function AmbientColor: TVector3; virtual; abstract; |
|
This item has no description. Source: src/scene/x3d/x3dnodes_utils_materials.inc (line 126). | |
![]() |
function PureEmissive: boolean; deprecated 'use TUnlitMaterialNode for unlit materials'; |
|
Warning: this symbol is deprecated: use TUnlitMaterialNode for unlit materials Only the emissiveColor is not black (zero), which means that the material behaves like unlit. This checks that ambient and diffuse and specular colors are all zero. It's an important information about the material sometimes. This way of achieving "something like unlit material" has issues, see https://github.com/michaliskambi/x3d-tests/wiki/Why-is-UnlitMaterial-useful . For this reason, we recommend to use (and detect, for optimization) the TUnlitMaterialNode instead of this "special case of Phong material". Source: src/scene/x3d/x3dnodes_utils_materials.inc (line 140). | |
![]() |
function Shininess: Single; virtual; abstract; |
|
This item has no description. Source: src/scene/x3d/x3dnodes_utils_materials.inc (line 142). | |
![]() |
function ShininessExp: Single; |
|
Shininess exponent for Phong lighting equations. Remember that the X3D Shininess field is "normalized", which means that it has to be multiplied by 128.0 to get actual exponent for lighting equations. This function returns the real exponent (already multiplied by 128.0, if necessary). Source: src/scene/x3d/x3dnodes_utils_materials.inc (line 151). | |
![]() |
function ReflectionColor: TVector3; virtual; abstract; |
|
This item has no description. Source: src/scene/x3d/x3dnodes_utils_materials.inc (line 153). | |
![]() |
function TransmissionColor: TVector3; virtual; |
|
This item has no description. Source: src/scene/x3d/x3dnodes_utils_materials.inc (line 154). | |
![]() |
function ReflSpecular: TVector3; virtual; |
|
Warning: this symbol is deprecated. Used by path-tracer. See https://castle-engine.io/x3d_extensions.php#section_ext_material_phong_brdf_fields . Not useful for normal CGE rendering. Source: src/scene/x3d/x3dnodes_utils_materials.inc (line 160). | |
![]() |
function ReflDiffuse: TVector3; virtual; |
|
This item has no description. Source: src/scene/x3d/x3dnodes_utils_materials.inc (line 161). | |
![]() |
function TransSpecular: TVector3; virtual; |
|
This item has no description. Source: src/scene/x3d/x3dnodes_utils_materials.inc (line 162). | |
![]() |
function TransDiffuse: TVector3; virtual; |
|
This item has no description. Source: src/scene/x3d/x3dnodes_utils_materials.inc (line 163). | |
![]() |
function ReflSpecularExp: Single; virtual; |
|
This item has no description. Source: src/scene/x3d/x3dnodes_utils_materials.inc (line 164). | |
![]() |
function TransSpecularExp: Single; virtual; |
|
This item has no description. Source: src/scene/x3d/x3dnodes_utils_materials.inc (line 165). | |
Properties
![]() |
property DiffuseColor: TVector3 read GetDiffuseColor write SetDiffuseColor; |
|
This item has no description. Source: src/scene/x3d/x3dnodes_utils_materials.inc (line 127). | |
![]() |
property SpecularColor: TVector3 read GetSpecularColor write SetSpecularColor; |
|
This item has no description. Source: src/scene/x3d/x3dnodes_utils_materials.inc (line 128). | |
Generated by PasDoc 0.17.0.snapshot.

