Class PBRMaterialLoadingAdapter
Implements
- IMaterialLoadingAdapter
Index
Constructors
Accessors
Methods
Constructors
constructor
-
Creates a new instance of the PBRMaterialLoadingAdapter.
Parameters
- material: Material
The PBR material to adapt.
Returns PBRMaterialLoadingAdapter
- material: Material
Accessors
alpha Cut Off
-
get alphaCutOff(): number
Gets the alpha cutoff value.
Returns number
The alpha cutoff threshold (0-1)
-
set alphaCutOff(value: number): void
Sets the alpha cutoff value for alpha testing.
Parameters
- value: number
The alpha cutoff threshold (0-1)
Returns void
- value: number
ambient Occlusion Texture
-
get ambientOcclusionTexture(): Nullable<BaseTexture>
Gets the ambient occlusion texture.
Returns Nullable<BaseTexture>
The ambient occlusion texture or null
-
set ambientOcclusionTexture(value: Nullable<BaseTexture>): void
Sets the ambient occlusion texture (mapped to PBR ambientTexture). Automatically enables grayscale mode when set.
Parameters
- value: Nullable<BaseTexture>
The ambient occlusion texture or null
Returns void
- value: Nullable<BaseTexture>
ambient Occlusion Texture Strength
-
get ambientOcclusionTextureStrength(): number
Gets the ambient occlusion texture strength.
Returns number
The strength value, defaults to 1.0 if not set
-
set ambientOcclusionTextureStrength(value: number): void
Sets the ambient occlusion texture strength.
Parameters
- value: number
The strength value (typically 0-1)
Returns void
- value: number
back Face Culling
-
get backFaceCulling(): boolean
Gets whether back face culling is enabled.
Returns boolean
True if back face culling is enabled
-
set backFaceCulling(value: boolean): void
Sets whether back face culling is enabled.
Parameters
- value: boolean
True to enable back face culling
Returns void
- value: boolean
base Color
-
get baseColor(): Color3
Gets the base color of the material.
Returns Color3
The base color as a Color3
-
set baseColor(value: Color3): void
Sets the base color of the material (mapped to PBR albedoColor).
Parameters
- value: Color3
The base color as a Color3
Returns void
- value: Color3
base Color Texture
-
get baseColorTexture(): Nullable<BaseTexture>
Gets the base color texture of the material.
Returns Nullable<BaseTexture>
The base color texture or null
-
set baseColorTexture(value: Nullable<BaseTexture>): void
Sets the base color texture of the material (mapped to PBR albedoTexture).
Parameters
- value: Nullable<BaseTexture>
The base color texture or null
Returns void
- value: Nullable<BaseTexture>
base Diffuse Roughness
-
get baseDiffuseRoughness(): number
Gets the base diffuse roughness of the material.
Returns number
The diffuse roughness value (0-1), defaults to 0 if not set
-
set baseDiffuseRoughness(value: number): void
Sets the base diffuse roughness of the material.
Parameters
- value: number
The diffuse roughness value (0-1)
Returns void
- value: number
base Diffuse Roughness Texture
-
get baseDiffuseRoughnessTexture(): Nullable<BaseTexture>
Gets the base diffuse roughness texture of the material.
Returns Nullable<BaseTexture>
The diffuse roughness texture or null
-
set baseDiffuseRoughnessTexture(value: Nullable<BaseTexture>): void
Sets the base diffuse roughness texture of the material.
Parameters
- value: Nullable<BaseTexture>
The diffuse roughness texture or null
Returns void
- value: Nullable<BaseTexture>
base Metalness
-
get baseMetalness(): number
Gets the base metalness value of the material.
Returns number
The metalness value (0-1), defaults to 1 if not set
-
set baseMetalness(value: number): void
Sets the base metalness value of the material (mapped to PBR metallic).
Parameters
- value: number
The metalness value (0-1)
Returns void
- value: number
base Metalness Texture
-
get baseMetalnessTexture(): Nullable<BaseTexture>
Gets the base metalness texture of the material.
Returns Nullable<BaseTexture>
The metalness texture or null
-
set baseMetalnessTexture(value: Nullable<BaseTexture>): void
Sets the base metalness texture of the material (mapped to PBR metallicTexture).
Parameters
- value: Nullable<BaseTexture>
The metalness texture or null
Returns void
- value: Nullable<BaseTexture>
coat Color
-
set coatColor(value: Color3): void
Sets the coat color (mapped to PBR clearCoat.tintColor).
Parameters
- value: Color3
The coat tint color as a Color3
Returns void
- value: Color3
coat Color Texture
-
set coatColorTexture(value: Nullable<BaseTexture>): void
Sets the coat color texture (mapped to PBR clearCoat.tintTexture).
Parameters
- value: Nullable<BaseTexture>
The coat color texture or null
Returns void
- value: Nullable<BaseTexture>
coat Darkening
-
set coatDarkening(value: number): void
Sets the coat darkening value. Note: PBR doesn't have a direct coat darkening property, so this is a no-op.
Parameters
- value: number
The coat darkening value (ignored for PBR)
Returns void
- value: number
coat Darkening Texture
-
set coatDarkeningTexture(value: Nullable<BaseTexture>): void
Sets the coat darkening texture
Parameters
- value: Nullable<BaseTexture>
The coat darkening texture or null
Returns void
- value: Nullable<BaseTexture>
coat Ior
-
set coatIor(value: number): void
Sets the coat index of refraction (IOR).
Parameters
- value: number
Returns void
coat Roughness
-
get coatRoughness(): number
Gets the coat roughness.
Returns number
The coat roughness value, defaults to 0 if not set
-
set coatRoughness(value: number): void
Sets the coat roughness (mapped to PBR clearCoat.roughness). Automatically enables clear coat.
Parameters
- value: number
The coat roughness value (0-1)
Returns void
- value: number
coat Roughness Anisotropy
-
get coatRoughnessAnisotropy(): number
Gets the coat roughness anisotropy. Note: PBR clearCoat doesn't support anisotropy yet, so this returns 0.
Returns number
Currently returns 0 as clearCoat anisotropy is not yet available
-
set coatRoughnessAnisotropy(value: number): void
Sets the coat roughness anisotropy. Note: PBR clearCoat doesn't support anisotropy yet, so this is a placeholder.
Parameters
- value: number
The coat anisotropy intensity value (currently ignored)
Returns void
- value: number
coat Roughness Texture
-
get coatRoughnessTexture(): Nullable<BaseTexture>
Gets the coat roughness texture.
Returns Nullable<BaseTexture>
The coat roughness texture or null
-
set coatRoughnessTexture(value: Nullable<BaseTexture>): void
Sets the coat roughness texture (mapped to PBR clearCoat.textureRoughness). Automatically enables clear coat and disables using roughness from main texture.
Parameters
- value: Nullable<BaseTexture>
The coat roughness texture or null
Returns void
- value: Nullable<BaseTexture>
coat Weight
-
get coatWeight(): number
Gets the coat weight.
Returns number
The coat weight value
-
set coatWeight(value: number): void
Sets the coat weight (mapped to PBR clearCoat.intensity). Automatically enables clear coat.
Parameters
- value: number
The coat weight value (0-1)
Returns void
- value: number
coat Weight Texture
-
get coatWeightTexture(): Nullable<BaseTexture>
Gets the coat weight texture.
Returns Nullable<BaseTexture>
The coat weight texture or null
-
set coatWeightTexture(value: Nullable<BaseTexture>): void
Sets the coat weight texture (mapped to PBR clearCoat.texture). Automatically enables clear coat.
Parameters
- value: Nullable<BaseTexture>
The coat weight texture or null
Returns void
- value: Nullable<BaseTexture>
diffuse Transmission Tint
-
get diffuseTransmissionTint(): Color3
Gets the subsurface constant tint (when using subsurface scattering)
Returns Color3
The subsurface constant tint as a Color3
-
set diffuseTransmissionTint(value: Color3): void
Sets the surface tint of the material (when using subsurface scattering)
Parameters
- value: Color3
Returns void
diffuse Transmission Tint Texture
-
set diffuseTransmissionTintTexture(value: Nullable<BaseTexture>): void
Sets the subsurface constant tint texture (when using subsurface scattering)
Parameters
- value: Nullable<BaseTexture>
The subsurface constant tint texture or null
Returns void
- value: Nullable<BaseTexture>
emission Color
-
get emissionColor(): Color3
Gets the emission color.
Returns Color3
The emission color as a Color3
-
set emissionColor(value: Color3): void
Sets the emission color (mapped to PBR emissiveColor).
Parameters
- value: Color3
The emission color as a Color3
Returns void
- value: Color3
emission Color Texture
-
get emissionColorTexture(): Nullable<BaseTexture>
Gets the emission color texture.
Returns Nullable<BaseTexture>
The emission texture or null
-
set emissionColorTexture(value: Nullable<BaseTexture>): void
Sets the emission color texture (mapped to PBR emissiveTexture).
Parameters
- value: Nullable<BaseTexture>
The emission texture or null
Returns void
- value: Nullable<BaseTexture>
emission Luminance
-
get emissionLuminance(): number
Gets the emission luminance/intensity.
Returns number
The emission intensity value
-
set emissionLuminance(value: number): void
Sets the emission luminance/intensity (mapped to PBR emissiveIntensity).
Parameters
- value: number
The emission intensity value
Returns void
- value: number
fuzz Color
-
set fuzzColor(value: Color3): void
Sets the sheen color (mapped to PBR sheen.color). Automatically enables sheen.
Parameters
- value: Color3
The sheen color as a Color3
Returns void
- value: Color3
fuzz Color Texture
-
set fuzzColorTexture(value: Nullable<BaseTexture>): void
Sets the sheen color texture (mapped to PBR sheen.texture). Automatically enables sheen.
Parameters
- value: Nullable<BaseTexture>
The sheen color texture or null
Returns void
- value: Nullable<BaseTexture>
fuzz Roughness
-
set fuzzRoughness(value: number): void
Sets the sheen roughness (mapped to PBR sheen.roughness). Automatically enables sheen.
Parameters
- value: number
The sheen roughness value (0-1)
Returns void
- value: number
fuzz Roughness Texture
-
set fuzzRoughnessTexture(value: Nullable<BaseTexture>): void
Sets the sheen roughness texture (mapped to PBR sheen.textureRoughness). Automatically enables sheen.
Parameters
- value: Nullable<BaseTexture>
The sheen roughness texture or null
Returns void
- value: Nullable<BaseTexture>
fuzz Weight
-
set fuzzWeight(value: number): void
Sets the sheen weight (mapped to PBR sheen.intensity). Automatically enables sheen.
Parameters
- value: number
The sheen weight value
Returns void
- value: number
fuzz Weight Texture
-
set fuzzWeightTexture(value: Nullable<BaseTexture>): void
Sets the fuzz weight texture.
Parameters
- value: Nullable<BaseTexture>
The fuzz weight texture or null
Returns void
- value: Nullable<BaseTexture>
geometry Coat Normal Texture
-
get geometryCoatNormalTexture(): Nullable<BaseTexture>
Gets the geometry coat normal texture.
Returns Nullable<BaseTexture>
The coat normal texture or null
-
set geometryCoatNormalTexture(value: Nullable<BaseTexture>): void
Sets the geometry coat normal texture (mapped to PBR clearCoat.bumpTexture). Automatically enables clear coat.
Parameters
- value: Nullable<BaseTexture>
The coat normal texture or null
Returns void
- value: Nullable<BaseTexture>
geometry Coat Normal Texture Scale
-
set geometryCoatNormalTextureScale(value: number): void
Sets the geometry coat normal texture scale.
Parameters
- value: number
The scale value for the coat normal texture
Returns void
- value: number
geometry Coat Tangent Angle
-
set geometryCoatTangentAngle(value: number): void
Sets the coat tangent angle for anisotropy. Note: PBR clearCoat doesn't support anisotropy yet, so this is a placeholder.
Parameters
- value: number
The coat anisotropy rotation angle in radians (currently ignored)
Returns void
- value: number
geometry Coat Tangent Texture
-
get geometryCoatTangentTexture(): Nullable<BaseTexture>
Gets the coat tangent texture for anisotropy. Note: PBR clearCoat doesn't support anisotropy textures yet, so this returns null.
Returns Nullable<BaseTexture>
Currently returns null as clearCoat anisotropy is not yet available
-
set geometryCoatTangentTexture(value: Nullable<BaseTexture>): void
Sets the coat tangent texture for anisotropy. Note: PBR clearCoat doesn't support anisotropy textures yet, so this is a placeholder.
Parameters
- value: Nullable<BaseTexture>
The coat anisotropy texture (currently ignored)
Returns void
- value: Nullable<BaseTexture>
geometry Normal Texture
-
get geometryNormalTexture(): Nullable<BaseTexture>
Gets the geometry normal texture.
Returns Nullable<BaseTexture>
The normal texture or null
-
set geometryNormalTexture(value: Nullable<BaseTexture>): void
Sets the geometry normal texture (mapped to PBR bumpTexture). Also forces irradiance computation in fragment shader for better lighting.
Parameters
- value: Nullable<BaseTexture>
The normal texture or null
Returns void
- value: Nullable<BaseTexture>
geometry Opacity
-
get geometryOpacity(): number
Gets the geometry opacity.
Returns number
The opacity value (0-1)
-
set geometryOpacity(value: number): void
Sets the geometry opacity (mapped to PBR alpha).
Parameters
- value: number
The opacity value (0-1)
Returns void
- value: number
geometry Tangent Angle
-
set geometryTangentAngle(value: number): void
Sets the anisotropy rotation (mapped to PBR anisotropy.angle). Automatically enables anisotropy.
Parameters
- value: number
The anisotropy rotation angle in radians
Returns void
- value: number
geometry Tangent Texture
-
get geometryTangentTexture(): Nullable<BaseTexture>
Gets the geometry tangent texture.
Returns Nullable<BaseTexture>
The anisotropy texture or null
-
set geometryTangentTexture(value: Nullable<BaseTexture>): void
Sets the geometry tangent texture (mapped to PBR anisotropy.texture). Automatically enables anisotropy.
Parameters
- value: Nullable<BaseTexture>
The anisotropy texture or null
Returns void
- value: Nullable<BaseTexture>
geometry Thin Walled
-
get geometryThinWalled(): boolean
Gets whether the material is thin-walled (i.e. non-volumetric) or not.
Returns boolean
-
set geometryThinWalled(value: boolean): void
Sets whether the material is thin-walled (i.e. non-volumetric) or not.
Parameters
- value: boolean
Returns void
glossiness
-
get glossiness(): number
Sets/gets the glossiness (inverted roughness) ONLY used for specular/glossiness workflow; has no effect when metallic/roughness workflow is active
Returns number
-
set glossiness(value: number): void
Sets/gets the glossiness (inverted roughness) ONLY used for specular/glossiness workflow; has no effect when metallic/roughness workflow is active
Parameters
- value: number
Returns void
is Unlit
-
get isUnlit(): boolean
Whether the material should be treated as unlit
Returns boolean
-
set isUnlit(value: boolean): void
Sets whether the material should be treated as unlit
Parameters
- value: boolean
Returns void
material
-
get material(): PBRMaterial
Gets the underlying material
Returns PBRMaterial
refraction Background Texture
-
get refractionBackgroundTexture(): Nullable<BaseTexture>
Gets the refraction background texture
Returns Nullable<BaseTexture>
The refraction background texture or null
-
set refractionBackgroundTexture(value: Nullable<BaseTexture>): void
Sets the refraction background texture
Parameters
- value: Nullable<BaseTexture>
The refraction background texture or null
Returns void
- value: Nullable<BaseTexture>
specular Color
-
get specularColor(): Color3
Gets the specular color.
Returns Color3
The specular color as a Color3
-
set specularColor(value: Color3): void
Sets the specular color (mapped to PBR metallicReflectanceColor).
Parameters
- value: Color3
The specular color as a Color3
Returns void
- value: Color3
specular Color Texture
-
get specularColorTexture(): Nullable<BaseTexture>
Gets the specular color texture.
Returns Nullable<BaseTexture>
The specular color texture or null
-
set specularColorTexture(value: Nullable<BaseTexture>): void
Sets the specular color texture (mapped to PBR reflectanceTexture).
Parameters
- value: Nullable<BaseTexture>
The specular color texture or null
Returns void
- value: Nullable<BaseTexture>
specular Ior
-
get specularIor(): number
Gets the specular index of refraction.
Returns number
The IOR value
-
set specularIor(value: number): void
Sets the specular index of refraction (mapped to PBR indexOfRefraction).
Parameters
- value: number
The IOR value
Returns void
- value: number
specular Roughness
-
get specularRoughness(): number
Gets the specular roughness.
Returns number
The roughness value (0-1), defaults to 1 if not set
-
set specularRoughness(value: number): void
Sets the specular roughness (mapped to PBR roughness).
Parameters
- value: number
The roughness value (0-1)
Returns void
- value: number
specular Roughness Anisotropy
-
get specularRoughnessAnisotropy(): number
Gets the specular roughness anisotropy.
Returns number
The anisotropy intensity value
-
set specularRoughnessAnisotropy(value: number): void
Sets the specular roughness anisotropy (mapped to PBR anisotropy.intensity). Automatically enables anisotropy.
Parameters
- value: number
The anisotropy intensity value
Returns void
- value: number
specular Roughness Texture
-
get specularRoughnessTexture(): Nullable<BaseTexture>
Gets the specular roughness texture.
Returns Nullable<BaseTexture>
The roughness texture (same as metallic texture for PBR) or null
-
set specularRoughnessTexture(value: Nullable<BaseTexture>): void
Sets the specular roughness texture. Note: PBR uses the same texture for both metallic and roughness, so this only sets the texture if no base metalness texture exists.
Parameters
- value: Nullable<BaseTexture>
The roughness texture or null
Returns void
- value: Nullable<BaseTexture>
specular Weight
-
get specularWeight(): number
Gets the specular weight.
Returns number
The specular weight value, defaults to 1 if not set
-
set specularWeight(value: number): void
Sets the specular weight (mapped to PBR metallicF0Factor).
Parameters
- value: number
The specular weight value
Returns void
- value: number
specular Weight Texture
-
get specularWeightTexture(): Nullable<BaseTexture>
Gets the specular weight texture.
Returns Nullable<BaseTexture>
The specular weight texture or null
-
set specularWeightTexture(value: Nullable<BaseTexture>): void
Sets the specular weight texture (mapped to PBR metallicReflectanceTexture). Configures the material to use only metalness from this texture when set.
Parameters
- value: Nullable<BaseTexture>
The specular weight texture or null
Returns void
- value: Nullable<BaseTexture>
subsurface Color
-
set subsurfaceColor(value: Color3): void
Sets the subsurface color.
Parameters
- value: Color3
The subsurface tint color as a Color3
Returns void
- value: Color3
subsurface Color Texture
-
set subsurfaceColorTexture(value: Nullable<BaseTexture>): void
Sets the subsurface color texture.
Parameters
- value: Nullable<BaseTexture>
The subsurface tint texture or null
Returns void
- value: Nullable<BaseTexture>
subsurface Radius
-
get subsurfaceRadius(): number
Gets the subsurface radius (used for subsurface scattering) subsurfaceRadiusScale * subsurfaceRadius gives the mean free path per color channel.
Returns number
The subsurface radius as a Color3
-
set subsurfaceRadius(value: number): void
Sets the subsurface radius (used for subsurface scattering) subsurfaceRadiusScale * subsurfaceRadius gives the mean free path per color channel.
Parameters
- value: number
The subsurface radius as a number
Returns void
- value: number
subsurface Radius Scale
-
get subsurfaceRadiusScale(): Color3
Gets the subsurface radius scale (used for subsurface scattering) subsurfaceRadiusScale * subsurfaceRadius gives the mean free path per color channel.
Returns Color3
The subsurface radius scale as a Color3
-
set subsurfaceRadiusScale(value: Color3): void
Sets the subsurface radius scale (used for subsurface scattering) subsurfaceRadiusScale * subsurfaceRadius gives the mean free path per color channel.
Parameters
- value: Color3
The subsurface radius scale as a Color3
Returns void
- value: Color3
subsurface Scatter Anisotropy
-
set subsurfaceScatterAnisotropy(value: number): void
Sets the subsurface scattering anisotropy. Note: PBRMaterial does not have a direct equivalent, so this is a no-op.
Parameters
- value: number
The anisotropy intensity value (ignored for PBR)
Returns void
- value: number
subsurface Weight
-
get subsurfaceWeight(): number
Gets the subsurface weight
Returns number
The subsurface weight value
-
set subsurfaceWeight(value: number): void
Sets the subsurface weight
Parameters
- value: number
Returns void
subsurface Weight Texture
-
set subsurfaceWeightTexture(value: Nullable<BaseTexture>): void
Sets the subsurface weight texture
Parameters
- value: Nullable<BaseTexture>
Returns void
thin Film Ior
-
set thinFilmIor(value: number): void
Sets the iridescence IOR (mapped to PBR iridescence.indexOfRefraction).
Parameters
- value: number
The iridescence IOR value
Returns void
- value: number
thin Film Thickness Maximum
-
set thinFilmThicknessMaximum(value: number): void
Sets the iridescence thickness maximum (mapped to PBR iridescence.maximumThickness).
Parameters
- value: number
The maximum thickness value in nanometers
Returns void
- value: number
thin Film Thickness Minimum
-
set thinFilmThicknessMinimum(value: number): void
Sets the iridescence thickness minimum (mapped to PBR iridescence.minimumThickness).
Parameters
- value: number
The minimum thickness value in nanometers
Returns void
- value: number
thin Film Thickness Texture
-
set thinFilmThicknessTexture(value: Nullable<BaseTexture>): void
Sets the iridescence thickness texture (mapped to PBR iridescence.thicknessTexture).
Parameters
- value: Nullable<BaseTexture>
The iridescence thickness texture or null
Returns void
- value: Nullable<BaseTexture>
thin Film Weight
-
set thinFilmWeight(value: number): void
Sets the iridescence weight (mapped to PBR iridescence.intensity). Automatically enables iridescence.
Parameters
- value: number
The iridescence intensity value
Returns void
- value: number
thin Film Weight Texture
-
set thinFilmWeightTexture(value: Nullable<BaseTexture>): void
Sets the thin film weight texture (mapped to PBR iridescence.texture).
Parameters
- value: Nullable<BaseTexture>
The thin film weight texture or null
Returns void
- value: Nullable<BaseTexture>
transmission Color
-
get transmissionColor(): Color3
Sets the attenuation color (mapped to PBR subSurface.tintColor).
Returns Color3
The attenuation color as a Color3
-
set transmissionColor(value: Color3): void
Sets the attenuation color (mapped to PBR subSurface.tintColor).
Parameters
- value: Color3
The attenuation color as a Color3
Returns void
- value: Color3
transmission Depth
-
get transmissionDepth(): number
Gets the attenuation distance for volume.
Returns number
The attenuation distance value
-
set transmissionDepth(value: number): void
Sets the attenuation distance for volume.
Parameters
- value: number
The attenuation distance value
Returns void
- value: number
transmission Dispersion Abbe Number
-
set transmissionDispersionAbbeNumber(value: number): void
Sets the transmission dispersion Abbe number.
Parameters
- value: number
The Abbe number value
Returns void
- value: number
transmission Dispersion Scale
-
set transmissionDispersionScale(value: number): void
Sets the transmission dispersion scale.
Parameters
- value: number
The dispersion scale value
Returns void
- value: number
transmission Scatter
-
get transmissionScatter(): Color3
Sets the transmission scatter coefficient.
Returns Color3
The scatter coefficient as a Color3
-
set transmissionScatter(value: Color3): void
Sets the transmission scatter coefficient.
Parameters
- value: Color3
The scatter coefficient as a Color3
Returns void
- value: Color3
transmission Scatter Anisotropy
-
set transmissionScatterAnisotropy(value: number): void
Sets the transmission scattering anisotropy.
Parameters
- value: number
The anisotropy intensity value (-1 to 1)
Returns void
- value: number
transmission Scatter Texture
-
set transmissionScatterTexture(value: Nullable<BaseTexture>): void
Sets the transmission scatter texture
Parameters
- value: Nullable<BaseTexture>
Returns void
transmission Weight
-
get transmissionWeight(): number
Gets the transmission weight.
Returns number
The transmission weight value
-
set transmissionWeight(value: number): void
Sets the transmission weight (mapped to PBR subSurface.refractionIntensity). Enables refraction when value > 0.
Parameters
- value: number
The transmission weight value (0-1)
Returns void
- value: number
transmission Weight Texture
-
set transmissionWeightTexture(value: Nullable<BaseTexture>): void
Sets the transmission weight texture (mapped to PBR subSurface.refractionIntensityTexture). Automatically enables refraction and glTF-style textures.
Parameters
- value: Nullable<BaseTexture>
The transmission weight texture or null
Returns void
- value: Nullable<BaseTexture>
transparency As Alpha Coverage
-
get transparencyAsAlphaCoverage(): boolean
Gets whether the transparency is treated as alpha coverage.
Returns boolean
-
set transparencyAsAlphaCoverage(value: boolean): void
Sets/Gets whether the transparency is treated as alpha coverage
Parameters
- value: boolean
Returns void
two Sided Lighting
-
get twoSidedLighting(): boolean
Gets whether two-sided lighting is enabled.
Returns boolean
True if two-sided lighting is enabled
-
set twoSidedLighting(value: boolean): void
Sets whether two-sided lighting is enabled.
Parameters
- value: boolean
True to enable two-sided lighting
Returns void
- value: boolean
unlit
-
set unlit(value: boolean): void
Sets whether the material is unlit.
Parameters
- value: boolean
True to make the material unlit
Returns void
- value: boolean
use Alpha From Base Color Texture
-
get useAlphaFromBaseColorTexture(): boolean
Gets whether alpha is used from the albedo texture.
Returns boolean
True if using alpha from albedo texture
-
set useAlphaFromBaseColorTexture(value: boolean): void
Sets whether to use alpha from the albedo texture.
Parameters
- value: boolean
True to use alpha from albedo texture
Returns void
- value: boolean
use Metallic From Metallic Texture Blue
-
set useMetallicFromMetallicTextureBlue(value: boolean): void
Sets whether to use metalness from the metallic texture's blue channel.
Parameters
- value: boolean
True to use blue channel for metalness
Returns void
- value: boolean
use Roughness From Metallic Texture Green
-
set useRoughnessFromMetallicTextureGreen(value: boolean): void
Sets whether to use roughness from the metallic texture's green channel. Also disables using roughness from the alpha channel when enabled.
Parameters
- value: boolean
True to use green channel for roughness
Returns void
- value: boolean
volume Thickness
-
set volumeThickness(value: number): void
Sets the thickness factor (mapped to PBR subSurface.maximumThickness). Automatically enables refraction.
Parameters
- value: number
The thickness value
Returns void
- value: number
volume Thickness Texture
-
set volumeThicknessTexture(value: Nullable<BaseTexture>): void
Sets the thickness texture (mapped to PBR subSurface.thicknessTexture). Automatically enables refraction.
Parameters
- value: Nullable<BaseTexture>
The thickness texture or null
Returns void
- value: Nullable<BaseTexture>
Methods
configure Coat
-
Configures clear coat for PBR material. Enables clear coat and sets up proper configuration.
Returns void
configure Fuzz
-
Configures sheen for PBR material. Enables sheen and sets up proper configuration.
Returns void
configure Gltf Style Anisotropy
-
Configures glTF-style anisotropy for the material. Note: PBR materials don't need this configuration, so this is a no-op.
Parameters
- useGltfStyle: boolean = true
Whether to use glTF-style anisotropy (ignored for PBR)
Returns void
- useGltfStyle: boolean = true
configure Specular Glossiness
-
Enable the specular/glossiness workflow and disable metallic/roughness.
Returns void
configure Subsurface
-
Configures subsurface properties for PBR material
Returns void
configure Transmission
-
Configures transmission for thin-surface transmission (KHR_materials_transmission). Sets up the material for proper thin-surface transmission behavior.
Returns void
configure Volume
-
Configures volume properties for PBR material. Nothing to do for PBRMaterial.
Returns void
enable Specular Edge Color
-
Configures specular properties and optionally enables OpenPBR BRDF model for edge color support.
Parameters
- enableEdgeColor: boolean = false
Whether to enable OpenPBR BRDF models for edge color support
Returns void
- enableEdgeColor: boolean = false
finalize Async
-
No-op: PBRMaterial has no deferred finalization.
Parameters
- _loader: GLTFLoader
Unused.
Returns Promise<void>
- _loader: GLTFLoader
is Translucent
-
Does this material have a translucent surface (i.e. either transmission or subsurface)?
Returns boolean
True if the material is translucent, false otherwise
set Normal Map Inversions
-
Sets the normal map inversions for the material.
Parameters
- invertX: boolean
Whether to invert the normal map on the X axis
- invertY: boolean
Whether to invert the normal map on the Y axis
Returns void
- invertX: boolean
Material Loading Adapter for PBR materials that provides a unified OpenPBR-like interface.