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.
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; |
|
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 |
nested const DefaultAmbientIntensity = 0.2; |
|
This item has no description. |
nested const DefaultDiffuseColor: TVector3 = (X: 0.8; Y: 0.8; Z: 0.8); |
|
This item has no description. |
nested const DefaultSpecularColor: TVector3 = (X: 0; Y: 0; Z: 0); |
|
This item has no description. |
nested const DefaultEmissiveColor: TVector3 = (X: 0; Y: 0; Z: 0); |
|
This item has no description. |
nested const DefaultShininess = 0.2; |
|
This item has no description. |
nested const DefaultShininessExp = DefaultShininess * 128; |
|
This item has no description. |
nested const DefaultReflectionColor: TVector3 = (X: 0; Y: 0; Z: 0); |
|
This item has no description. |
nested const DefaultTransmissionColor: TVector3 = (X: 0; Y: 0; Z: 0); |
|
This item has no description. |
nested const DefaultReflSpecularExp = 1000000; |
|
This item has no description. |
nested const DefaultTransSpecularExp = 1000000; |
|
This item has no description. |
Methods
function GetDiffuseColor: TVector3; virtual; abstract; |
|
This item has no description. |
procedure SetDiffuseColor(const Value: TVector3); virtual; abstract; |
|
This item has no description. |
function GetSpecularColor: TVector3; virtual; abstract; |
|
This item has no description. |
procedure SetSpecularColor(const Value: TVector3); virtual; abstract; |
|
This item has no description. |
function GetMainColor: TVector3; override; |
|
Main color of Phong material is DiffuseColor. |
procedure SetMainColor(const Value: TVector3); override; |
|
This item has no description. |
function AmbientColor: TVector3; virtual; abstract; |
|
This item has no description. |
function PureEmissive: boolean; |
|
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. We can optimize this case when rendering. |
function Shininess: Single; virtual; abstract; |
|
This item has no description. |
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). |
function ReflectionColor: TVector3; virtual; abstract; |
|
This item has no description. |
function TransmissionColor: TVector3; virtual; |
|
This item has no description. |
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. |
function ReflDiffuse: TVector3; virtual; |
|
This item has no description. |
function TransSpecular: TVector3; virtual; |
|
This item has no description. |
function TransDiffuse: TVector3; virtual; |
|
This item has no description. |
function ReflSpecularExp: Single; virtual; |
|
This item has no description. |
function TransSpecularExp: Single; virtual; |
|
This item has no description. |
Properties
property DiffuseColor: TVector3 read GetDiffuseColor write SetDiffuseColor; |
|
This item has no description. |
property SpecularColor: TVector3 read GetSpecularColor write SetSpecularColor; |
|
This item has no description. |
Generated by PasDoc 0.16.0-snapshot.