Documentation / scene / ClipmapTerrainMaterial
Class: ClipmapTerrainMaterial
Defined in: libs/scene/src/material/terrain-cm.ts:51
Default material type of clipmap terrain
Extends
MeshMaterial<this> &object&TextureProp<"normal"> &object&object&object&TextureProp<"albedo"> &object&object&object&object&TextureProp<"occlusion"> &object&object&TextureProp<"emissive"> &object&object&TextureProp<"sheenColor"> &object&object&TextureProp<"sheenRoughness"> &object&object&TextureProp<"clearcoatIntensity"> &object&object&TextureProp<"clearcoatRoughness"> &object&object&TextureProp<"clearcoatNormal"> &object&object&TextureProp<"transmission"> &object&object&TextureProp<"thickness"> &object&object&TextureProp<"iridescence"> &object&object&TextureProp<"iridescenceThickness"> &object&object&IMixinPBRBRDF&TextureProp<"metallicRoughness"> &object&object&TextureProp<"specular"> &object&object&TextureProp<"specularColor"> &object&object&TextureProp<"anisotropyDirection"> &object&object
Constructors
Constructor
new ClipmapTerrainMaterial(
heightMap):ClipmapTerrainMaterial
Defined in: libs/scene/src/material/terrain-cm.ts:69
Parameters
heightMap
Texture2D
Returns
ClipmapTerrainMaterial
Overrides
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).constructor
Properties
normalTexture
normalTexture:
Texture2D<unknown>
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).normalTexture
normalTextureSampler
normalTextureSampler:
TextureSampler<unknown>
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).normalTextureSampler
normalTexCoordIndex
normalTexCoordIndex:
number
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).normalTexCoordIndex
normalTexCoordMatrix
normalTexCoordMatrix:
Matrix4x4
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).normalTexCoordMatrix
getNormalTextureUniform
getNormalTextureUniform: (
scope) =>PBShaderExp
Parameters
scope
PBInsideFunctionScope
Returns
PBShaderExp
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).getNormalTextureUniform
sampleNormalTexture
sampleNormalTexture: (
scope,texCoord?) =>PBShaderExp
Parameters
scope
PBInsideFunctionScope
texCoord?
PBShaderExp
Returns
PBShaderExp
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).sampleNormalTexture
albedoTexture
albedoTexture:
Texture2D<unknown>
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).albedoTexture
albedoTextureSampler
albedoTextureSampler:
TextureSampler<unknown>
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).albedoTextureSampler
albedoTexCoordIndex
albedoTexCoordIndex:
number
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).albedoTexCoordIndex
albedoTexCoordMatrix
albedoTexCoordMatrix:
Matrix4x4
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).albedoTexCoordMatrix
getAlbedoTextureUniform
getAlbedoTextureUniform: (
scope) =>PBShaderExp
Parameters
scope
PBInsideFunctionScope
Returns
PBShaderExp
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).getAlbedoTextureUniform
getAlbedoTexCoord
getAlbedoTexCoord: (
scope) =>PBShaderExp
Parameters
scope
PBInsideFunctionScope
Returns
PBShaderExp
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).getAlbedoTexCoord
sampleAlbedoTexture
sampleAlbedoTexture: (
scope,texCoord?) =>PBShaderExp
Parameters
scope
PBInsideFunctionScope
texCoord?
PBShaderExp
Returns
PBShaderExp
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).sampleAlbedoTexture
occlusionTexture
occlusionTexture:
Texture2D<unknown>
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).occlusionTexture
occlusionTextureSampler
occlusionTextureSampler:
TextureSampler<unknown>
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).occlusionTextureSampler
occlusionTexCoordIndex
occlusionTexCoordIndex:
number
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).occlusionTexCoordIndex
occlusionTexCoordMatrix
occlusionTexCoordMatrix:
Matrix4x4
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).occlusionTexCoordMatrix
getOcclusionTextureUniform
getOcclusionTextureUniform: (
scope) =>PBShaderExp
Parameters
scope
PBInsideFunctionScope
Returns
PBShaderExp
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).getOcclusionTextureUniform
getOcclusionTexCoord
getOcclusionTexCoord: (
scope) =>PBShaderExp
Parameters
scope
PBInsideFunctionScope
Returns
PBShaderExp
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).getOcclusionTexCoord
sampleOcclusionTexture
sampleOcclusionTexture: (
scope,texCoord?) =>PBShaderExp
Parameters
scope
PBInsideFunctionScope
texCoord?
PBShaderExp
Returns
PBShaderExp
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).sampleOcclusionTexture
emissiveTexture
emissiveTexture:
Texture2D<unknown>
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).emissiveTexture
emissiveTextureSampler
emissiveTextureSampler:
TextureSampler<unknown>
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).emissiveTextureSampler
emissiveTexCoordIndex
emissiveTexCoordIndex:
number
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).emissiveTexCoordIndex
emissiveTexCoordMatrix
emissiveTexCoordMatrix:
Matrix4x4
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).emissiveTexCoordMatrix
getEmissiveTextureUniform
getEmissiveTextureUniform: (
scope) =>PBShaderExp
Parameters
scope
PBInsideFunctionScope
Returns
PBShaderExp
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).getEmissiveTextureUniform
getEmissiveTexCoord
getEmissiveTexCoord: (
scope) =>PBShaderExp
Parameters
scope
PBInsideFunctionScope
Returns
PBShaderExp
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).getEmissiveTexCoord
sampleEmissiveTexture
sampleEmissiveTexture: (
scope,texCoord?) =>PBShaderExp
Parameters
scope
PBInsideFunctionScope
texCoord?
PBShaderExp
Returns
PBShaderExp
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).sampleEmissiveTexture
sheenColorTexture
sheenColorTexture:
Texture2D<unknown>
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).sheenColorTexture
sheenColorTextureSampler
sheenColorTextureSampler:
TextureSampler<unknown>
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).sheenColorTextureSampler
sheenColorTexCoordIndex
sheenColorTexCoordIndex:
number
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).sheenColorTexCoordIndex
sheenColorTexCoordMatrix
sheenColorTexCoordMatrix:
Matrix4x4
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).sheenColorTexCoordMatrix
getSheenColorTextureUniform
getSheenColorTextureUniform: (
scope) =>PBShaderExp
Parameters
scope
PBInsideFunctionScope
Returns
PBShaderExp
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).getSheenColorTextureUniform
getSheenColorTexCoord
getSheenColorTexCoord: (
scope) =>PBShaderExp
Parameters
scope
PBInsideFunctionScope
Returns
PBShaderExp
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).getSheenColorTexCoord
sampleSheenColorTexture
sampleSheenColorTexture: (
scope,texCoord?) =>PBShaderExp
Parameters
scope
PBInsideFunctionScope
texCoord?
PBShaderExp
Returns
PBShaderExp
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).sampleSheenColorTexture
sheenRoughnessTexture
sheenRoughnessTexture:
Texture2D<unknown>
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).sheenRoughnessTexture
sheenRoughnessTextureSampler
sheenRoughnessTextureSampler:
TextureSampler<unknown>
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).sheenRoughnessTextureSampler
sheenRoughnessTexCoordIndex
sheenRoughnessTexCoordIndex:
number
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).sheenRoughnessTexCoordIndex
sheenRoughnessTexCoordMatrix
sheenRoughnessTexCoordMatrix:
Matrix4x4
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).sheenRoughnessTexCoordMatrix
getSheenRoughnessTextureUniform
getSheenRoughnessTextureUniform: (
scope) =>PBShaderExp
Parameters
scope
PBInsideFunctionScope
Returns
PBShaderExp
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).getSheenRoughnessTextureUniform
getSheenRoughnessTexCoord
getSheenRoughnessTexCoord: (
scope) =>PBShaderExp
Parameters
scope
PBInsideFunctionScope
Returns
PBShaderExp
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).getSheenRoughnessTexCoord
sampleSheenRoughnessTexture
sampleSheenRoughnessTexture: (
scope,texCoord?) =>PBShaderExp
Parameters
scope
PBInsideFunctionScope
texCoord?
PBShaderExp
Returns
PBShaderExp
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).sampleSheenRoughnessTexture
clearcoatIntensityTexture
clearcoatIntensityTexture:
Texture2D<unknown>
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).clearcoatIntensityTexture
clearcoatIntensityTextureSampler
clearcoatIntensityTextureSampler:
TextureSampler<unknown>
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).clearcoatIntensityTextureSampler
clearcoatIntensityTexCoordIndex
clearcoatIntensityTexCoordIndex:
number
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).clearcoatIntensityTexCoordIndex
clearcoatIntensityTexCoordMatrix
clearcoatIntensityTexCoordMatrix:
Matrix4x4
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).clearcoatIntensityTexCoordMatrix
getClearcoatIntensityTextureUniform
getClearcoatIntensityTextureUniform: (
scope) =>PBShaderExp
Parameters
scope
PBInsideFunctionScope
Returns
PBShaderExp
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).getClearcoatIntensityTextureUniform
getClearcoatIntensityTexCoord
getClearcoatIntensityTexCoord: (
scope) =>PBShaderExp
Parameters
scope
PBInsideFunctionScope
Returns
PBShaderExp
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).getClearcoatIntensityTexCoord
sampleClearcoatIntensityTexture
sampleClearcoatIntensityTexture: (
scope,texCoord?) =>PBShaderExp
Parameters
scope
PBInsideFunctionScope
texCoord?
PBShaderExp
Returns
PBShaderExp
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).sampleClearcoatIntensityTexture
clearcoatRoughnessTexture
clearcoatRoughnessTexture:
Texture2D<unknown>
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).clearcoatRoughnessTexture
clearcoatRoughnessTextureSampler
clearcoatRoughnessTextureSampler:
TextureSampler<unknown>
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).clearcoatRoughnessTextureSampler
clearcoatRoughnessTexCoordIndex
clearcoatRoughnessTexCoordIndex:
number
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).clearcoatRoughnessTexCoordIndex
clearcoatRoughnessTexCoordMatrix
clearcoatRoughnessTexCoordMatrix:
Matrix4x4
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).clearcoatRoughnessTexCoordMatrix
getClearcoatRoughnessTextureUniform
getClearcoatRoughnessTextureUniform: (
scope) =>PBShaderExp
Parameters
scope
PBInsideFunctionScope
Returns
PBShaderExp
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).getClearcoatRoughnessTextureUniform
getClearcoatRoughnessTexCoord
getClearcoatRoughnessTexCoord: (
scope) =>PBShaderExp
Parameters
scope
PBInsideFunctionScope
Returns
PBShaderExp
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).getClearcoatRoughnessTexCoord
sampleClearcoatRoughnessTexture
sampleClearcoatRoughnessTexture: (
scope,texCoord?) =>PBShaderExp
Parameters
scope
PBInsideFunctionScope
texCoord?
PBShaderExp
Returns
PBShaderExp
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).sampleClearcoatRoughnessTexture
clearcoatNormalTexture
clearcoatNormalTexture:
Texture2D<unknown>
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).clearcoatNormalTexture
clearcoatNormalTextureSampler
clearcoatNormalTextureSampler:
TextureSampler<unknown>
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).clearcoatNormalTextureSampler
clearcoatNormalTexCoordIndex
clearcoatNormalTexCoordIndex:
number
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).clearcoatNormalTexCoordIndex
clearcoatNormalTexCoordMatrix
clearcoatNormalTexCoordMatrix:
Matrix4x4
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).clearcoatNormalTexCoordMatrix
getClearcoatNormalTextureUniform
getClearcoatNormalTextureUniform: (
scope) =>PBShaderExp
Parameters
scope
PBInsideFunctionScope
Returns
PBShaderExp
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).getClearcoatNormalTextureUniform
getClearcoatNormalTexCoord
getClearcoatNormalTexCoord: (
scope) =>PBShaderExp
Parameters
scope
PBInsideFunctionScope
Returns
PBShaderExp
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).getClearcoatNormalTexCoord
sampleClearcoatNormalTexture
sampleClearcoatNormalTexture: (
scope,texCoord?) =>PBShaderExp
Parameters
scope
PBInsideFunctionScope
texCoord?
PBShaderExp
Returns
PBShaderExp
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).sampleClearcoatNormalTexture
transmissionTexture
transmissionTexture:
Texture2D<unknown>
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).transmissionTexture
transmissionTextureSampler
transmissionTextureSampler:
TextureSampler<unknown>
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).transmissionTextureSampler
transmissionTexCoordIndex
transmissionTexCoordIndex:
number
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).transmissionTexCoordIndex
transmissionTexCoordMatrix
transmissionTexCoordMatrix:
Matrix4x4
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).transmissionTexCoordMatrix
getTransmissionTextureUniform
getTransmissionTextureUniform: (
scope) =>PBShaderExp
Parameters
scope
PBInsideFunctionScope
Returns
PBShaderExp
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).getTransmissionTextureUniform
getTransmissionTexCoord
getTransmissionTexCoord: (
scope) =>PBShaderExp
Parameters
scope
PBInsideFunctionScope
Returns
PBShaderExp
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).getTransmissionTexCoord
sampleTransmissionTexture
sampleTransmissionTexture: (
scope,texCoord?) =>PBShaderExp
Parameters
scope
PBInsideFunctionScope
texCoord?
PBShaderExp
Returns
PBShaderExp
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).sampleTransmissionTexture
thicknessTexture
thicknessTexture:
Texture2D<unknown>
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).thicknessTexture
thicknessTextureSampler
thicknessTextureSampler:
TextureSampler<unknown>
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).thicknessTextureSampler
thicknessTexCoordIndex
thicknessTexCoordIndex:
number
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).thicknessTexCoordIndex
thicknessTexCoordMatrix
thicknessTexCoordMatrix:
Matrix4x4
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).thicknessTexCoordMatrix
getThicknessTextureUniform
getThicknessTextureUniform: (
scope) =>PBShaderExp
Parameters
scope
PBInsideFunctionScope
Returns
PBShaderExp
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).getThicknessTextureUniform
getThicknessTexCoord
getThicknessTexCoord: (
scope) =>PBShaderExp
Parameters
scope
PBInsideFunctionScope
Returns
PBShaderExp
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).getThicknessTexCoord
sampleThicknessTexture
sampleThicknessTexture: (
scope,texCoord?) =>PBShaderExp
Parameters
scope
PBInsideFunctionScope
texCoord?
PBShaderExp
Returns
PBShaderExp
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).sampleThicknessTexture
iridescenceTexture
iridescenceTexture:
Texture2D<unknown>
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).iridescenceTexture
iridescenceTextureSampler
iridescenceTextureSampler:
TextureSampler<unknown>
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).iridescenceTextureSampler
iridescenceTexCoordIndex
iridescenceTexCoordIndex:
number
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).iridescenceTexCoordIndex
iridescenceTexCoordMatrix
iridescenceTexCoordMatrix:
Matrix4x4
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).iridescenceTexCoordMatrix
getIridescenceTextureUniform
getIridescenceTextureUniform: (
scope) =>PBShaderExp
Parameters
scope
PBInsideFunctionScope
Returns
PBShaderExp
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).getIridescenceTextureUniform
getIridescenceTexCoord
getIridescenceTexCoord: (
scope) =>PBShaderExp
Parameters
scope
PBInsideFunctionScope
Returns
PBShaderExp
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).getIridescenceTexCoord
sampleIridescenceTexture
sampleIridescenceTexture: (
scope,texCoord?) =>PBShaderExp
Parameters
scope
PBInsideFunctionScope
texCoord?
PBShaderExp
Returns
PBShaderExp
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).sampleIridescenceTexture
iridescenceThicknessTexture
iridescenceThicknessTexture:
Texture2D<unknown>
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).iridescenceThicknessTexture
iridescenceThicknessTextureSampler
iridescenceThicknessTextureSampler:
TextureSampler<unknown>
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).iridescenceThicknessTextureSampler
iridescenceThicknessTexCoordIndex
iridescenceThicknessTexCoordIndex:
number
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).iridescenceThicknessTexCoordIndex
iridescenceThicknessTexCoordMatrix
iridescenceThicknessTexCoordMatrix:
Matrix4x4
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).iridescenceThicknessTexCoordMatrix
getIridescenceThicknessTextureUniform
getIridescenceThicknessTextureUniform: (
scope) =>PBShaderExp
Parameters
scope
PBInsideFunctionScope
Returns
PBShaderExp
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).getIridescenceThicknessTextureUniform
getIridescenceThicknessTexCoord
getIridescenceThicknessTexCoord: (
scope) =>PBShaderExp
Parameters
scope
PBInsideFunctionScope
Returns
PBShaderExp
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).getIridescenceThicknessTexCoord
sampleIridescenceThicknessTexture
sampleIridescenceThicknessTexture: (
scope,texCoord?) =>PBShaderExp
Parameters
scope
PBInsideFunctionScope
texCoord?
PBShaderExp
Returns
PBShaderExp
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).sampleIridescenceThicknessTexture
metallicRoughnessTexture
metallicRoughnessTexture:
Texture2D<unknown>
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).metallicRoughnessTexture
metallicRoughnessTextureSampler
metallicRoughnessTextureSampler:
TextureSampler<unknown>
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).metallicRoughnessTextureSampler
metallicRoughnessTexCoordIndex
metallicRoughnessTexCoordIndex:
number
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).metallicRoughnessTexCoordIndex
metallicRoughnessTexCoordMatrix
metallicRoughnessTexCoordMatrix:
Matrix4x4
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).metallicRoughnessTexCoordMatrix
getMetallicRoughnessTextureUniform
getMetallicRoughnessTextureUniform: (
scope) =>PBShaderExp
Parameters
scope
PBInsideFunctionScope
Returns
PBShaderExp
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).getMetallicRoughnessTextureUniform
sampleMetallicRoughnessTexture
sampleMetallicRoughnessTexture: (
scope,texCoord?) =>PBShaderExp
Parameters
scope
PBInsideFunctionScope
texCoord?
PBShaderExp
Returns
PBShaderExp
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).sampleMetallicRoughnessTexture
specularTexture
specularTexture:
Texture2D<unknown>
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).specularTexture
specularTextureSampler
specularTextureSampler:
TextureSampler<unknown>
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).specularTextureSampler
specularTexCoordIndex
specularTexCoordIndex:
number
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).specularTexCoordIndex
specularTexCoordMatrix
specularTexCoordMatrix:
Matrix4x4
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).specularTexCoordMatrix
getSpecularTextureUniform
getSpecularTextureUniform: (
scope) =>PBShaderExp
Parameters
scope
PBInsideFunctionScope
Returns
PBShaderExp
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).getSpecularTextureUniform
getSpecularTexCoord
getSpecularTexCoord: (
scope) =>PBShaderExp
Parameters
scope
PBInsideFunctionScope
Returns
PBShaderExp
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).getSpecularTexCoord
sampleSpecularTexture
sampleSpecularTexture: (
scope,texCoord?) =>PBShaderExp
Parameters
scope
PBInsideFunctionScope
texCoord?
PBShaderExp
Returns
PBShaderExp
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).sampleSpecularTexture
specularColorTexture
specularColorTexture:
Texture2D<unknown>
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).specularColorTexture
specularColorTextureSampler
specularColorTextureSampler:
TextureSampler<unknown>
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).specularColorTextureSampler
specularColorTexCoordIndex
specularColorTexCoordIndex:
number
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).specularColorTexCoordIndex
specularColorTexCoordMatrix
specularColorTexCoordMatrix:
Matrix4x4
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).specularColorTexCoordMatrix
getSpecularColorTextureUniform
getSpecularColorTextureUniform: (
scope) =>PBShaderExp
Parameters
scope
PBInsideFunctionScope
Returns
PBShaderExp
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).getSpecularColorTextureUniform
getSpecularColorTexCoord
getSpecularColorTexCoord: (
scope) =>PBShaderExp
Parameters
scope
PBInsideFunctionScope
Returns
PBShaderExp
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).getSpecularColorTexCoord
sampleSpecularColorTexture
sampleSpecularColorTexture: (
scope,texCoord?) =>PBShaderExp
Parameters
scope
PBInsideFunctionScope
texCoord?
PBShaderExp
Returns
PBShaderExp
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).sampleSpecularColorTexture
anisotropyDirectionTexture
anisotropyDirectionTexture:
Texture2D<unknown>
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).anisotropyDirectionTexture
anisotropyDirectionTextureSampler
anisotropyDirectionTextureSampler:
TextureSampler<unknown>
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).anisotropyDirectionTextureSampler
anisotropyDirectionTexCoordIndex
anisotropyDirectionTexCoordIndex:
number
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).anisotropyDirectionTexCoordIndex
anisotropyDirectionTexCoordMatrix
anisotropyDirectionTexCoordMatrix:
Matrix4x4
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).anisotropyDirectionTexCoordMatrix
getAnisotropyDirectionTextureUniform
getAnisotropyDirectionTextureUniform: (
scope) =>PBShaderExp
Parameters
scope
PBInsideFunctionScope
Returns
PBShaderExp
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).getAnisotropyDirectionTextureUniform
getAnisotropyDirectionTexCoord
getAnisotropyDirectionTexCoord: (
scope) =>PBShaderExp
Parameters
scope
PBInsideFunctionScope
Returns
PBShaderExp
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).getAnisotropyDirectionTexCoord
sampleAnisotropyDirectionTexture
sampleAnisotropyDirectionTexture: (
scope,texCoord?) =>PBShaderExp
Parameters
scope
PBInsideFunctionScope
texCoord?
PBShaderExp
Returns
PBShaderExp
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).sampleAnisotropyDirectionTexture
albedoColor
albedoColor:
Vector4
Defined in: libs/scene/src/material/mixins/albedocolor.ts:16
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).albedoColor
metallic
metallic:
number
Defined in: libs/scene/src/material/mixins/lightmodel/pbrmetallicroughness.ts:39
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).metallic
roughness
roughness:
number
Defined in: libs/scene/src/material/mixins/lightmodel/pbrmetallicroughness.ts:40
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).roughness
specularFactor
specularFactor:
Vector4
Defined in: libs/scene/src/material/mixins/lightmodel/pbrmetallicroughness.ts:41
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).specularFactor
reflectionMode
reflectionMode:
PBRReflectionMode
Defined in: libs/scene/src/material/mixins/lightmodel/pbrmetallicroughness.ts:42
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).reflectionMode
anisotropy
anisotropy:
number
Defined in: libs/scene/src/material/mixins/lightmodel/pbrmetallicroughness.ts:43
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).anisotropy
anisotropyDirection
anisotropyDirection:
number
Defined in: libs/scene/src/material/mixins/lightmodel/pbrmetallicroughness.ts:44
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).anisotropyDirection
anisotropyDirectionScaleBias
anisotropyDirectionScaleBias:
Vector2
Defined in: libs/scene/src/material/mixins/lightmodel/pbrmetallicroughness.ts:45
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).anisotropyDirectionScaleBias
normalScale
normalScale:
number
Defined in: libs/scene/src/material/mixins/lit.ts:23
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).normalScale
normalMapMode
normalMapMode:
"tangent-space"|"object-space"
Defined in: libs/scene/src/material/mixins/lit.ts:24
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).normalMapMode
doubleSidedLighting
doubleSidedLighting:
boolean
Defined in: libs/scene/src/material/mixins/lit.ts:25
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).doubleSidedLighting
ior
ior:
number
Defined in: libs/scene/src/material/mixins/pbr/common.ts:30
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).ior
emissiveColor
emissiveColor:
Vector3
Defined in: libs/scene/src/material/mixins/pbr/common.ts:31
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).emissiveColor
emissiveStrength
emissiveStrength:
number
Defined in: libs/scene/src/material/mixins/pbr/common.ts:32
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).emissiveStrength
occlusionStrength
occlusionStrength:
number
Defined in: libs/scene/src/material/mixins/pbr/common.ts:33
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).occlusionStrength
rectSpecularScale
rectSpecularScale:
number
Defined in: libs/scene/src/material/mixins/pbr/common.ts:34
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).rectSpecularScale
transmission
transmission:
boolean
Defined in: libs/scene/src/material/mixins/pbr/common.ts:35
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).transmission
transmissionFactor
transmissionFactor:
number
Defined in: libs/scene/src/material/mixins/pbr/common.ts:36
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).transmissionFactor
thicknessFactor
thicknessFactor:
number
Defined in: libs/scene/src/material/mixins/pbr/common.ts:37
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).thicknessFactor
attenuationColor
attenuationColor:
Vector3
Defined in: libs/scene/src/material/mixins/pbr/common.ts:38
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).attenuationColor
attenuationDistance
attenuationDistance:
number
Defined in: libs/scene/src/material/mixins/pbr/common.ts:39
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).attenuationDistance
sheen
sheen:
boolean
Defined in: libs/scene/src/material/mixins/pbr/common.ts:40
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).sheen
sheenColorFactor
sheenColorFactor:
Vector3
Defined in: libs/scene/src/material/mixins/pbr/common.ts:41
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).sheenColorFactor
sheenRoughnessFactor
sheenRoughnessFactor:
number
Defined in: libs/scene/src/material/mixins/pbr/common.ts:42
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).sheenRoughnessFactor
clearcoat
clearcoat:
boolean
Defined in: libs/scene/src/material/mixins/pbr/common.ts:43
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).clearcoat
clearcoatIntensity
clearcoatIntensity:
number
Defined in: libs/scene/src/material/mixins/pbr/common.ts:44
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).clearcoatIntensity
clearcoatRoughnessFactor
clearcoatRoughnessFactor:
number
Defined in: libs/scene/src/material/mixins/pbr/common.ts:45
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).clearcoatRoughnessFactor
iridescence
iridescence:
boolean
Defined in: libs/scene/src/material/mixins/pbr/common.ts:46
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).iridescence
iridescenceFactor
iridescenceFactor:
number
Defined in: libs/scene/src/material/mixins/pbr/common.ts:47
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).iridescenceFactor
iridescenceIor
iridescenceIor:
number
Defined in: libs/scene/src/material/mixins/pbr/common.ts:48
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).iridescenceIor
iridescenceThicknessMin
iridescenceThicknessMin:
number
Defined in: libs/scene/src/material/mixins/pbr/common.ts:49
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).iridescenceThicknessMin
iridescenceThicknessMax
iridescenceThicknessMax:
number
Defined in: libs/scene/src/material/mixins/pbr/common.ts:50
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).iridescenceThicknessMax
getMetallicRoughnessTexCoord
getMetallicRoughnessTexCoord: (
scope) =>PBShaderExp
Defined in: libs/scene/src/material/terrain-cm.ts:325
Parameters
scope
PBInsideFunctionScope
Returns
PBShaderExp
Overrides
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).getMetallicRoughnessTexCoord
getNormalTexCoord
getNormalTexCoord: (
scope) =>PBShaderExp
Defined in: libs/scene/src/material/terrain-cm.ts:361
Parameters
scope
PBInsideFunctionScope
Returns
PBShaderExp
Overrides
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).getNormalTexCoord
Accessors
disposed
Get Signature
get disposed():
boolean
Defined in: libs/base/dist/index.d.ts:6065
Returns
boolean
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).disposed
changeTag
Get Signature
get changeTag():
number
Defined in: libs/scene/src/material/material.ts:164
Incremented when the material’s GPU-relevant state changes and render bundles may need to be rebuilt.
Returns
number
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).changeTag
instanceId
Get Signature
get instanceId():
number
Defined in: libs/scene/src/material/material.ts:170
Runtime-unique numeric identifier for the material instance.
Returns
number
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).instanceId
numPasses
Get Signature
get numPasses():
number
Defined in: libs/scene/src/material/material.ts:180
Number of rendering passes this material uses.
Increasing this will expand the per-pass hash cache; make sure to implement createHash(pass), _createProgram(pb, ctx, pass), and updateRenderStates(pass, ...) accordingly for each pass.
Returns
number
Set Signature
set numPasses(
val):void
Defined in: libs/scene/src/material/material.ts:183
Parameters
val
number
Returns
void
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).numPasses
coreMaterial
Get Signature
get coreMaterial():
this
Defined in: libs/scene/src/material/material.ts:264
Returns the core material that owns GPU state.
Instances may delegate to a shared core to reuse compiled programs and caches.
Returns
this
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).coreMaterial
drawContext
Get Signature
get drawContext():
DrawContext
Defined in: libs/scene/src/material/meshmaterial.ts:508
Draw context captured during program creation, available inside shader hooks.
Returns
The last DrawContext used to build or apply this material.
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).drawContext
pass
Get Signature
get pass():
number
Defined in: libs/scene/src/material/meshmaterial.ts:517
Current material pass index during program building. Typically used inside shader hooks to select per-pass logic.
Returns
number
The active pass index while building the program, or -1 when idle.
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).pass
alphaCutoff
Get Signature
get alphaCutoff():
number
Defined in: libs/scene/src/material/meshmaterial.ts:526
Alpha test cutoff in [0, 1].
- 0 disables alpha testing.
- > 0 discards fragments with alpha < cutoff. Changing this marks uniforms dirty (no shader rebuild).
Returns
number
Set Signature
set alphaCutoff(
val):void
Defined in: libs/scene/src/material/meshmaterial.ts:529
Parameters
val
number
Returns
void
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).alphaCutoff
alphaDither
Get Signature
get alphaDither():
boolean
Defined in: libs/scene/src/material/meshmaterial.ts:541
Whether alpha clipping uses frame-varying dither coverage.
- Effective only when alpha cutoff is enabled.
- Intended for masked materials (blendMode='none') to emulate soft transparency with TAA.
Returns
boolean
Set Signature
set alphaDither(
val):void
Defined in: libs/scene/src/material/meshmaterial.ts:544
Parameters
val
boolean
Returns
void
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).alphaDither
TAADisabled
Get Signature
get TAADisabled():
boolean
Defined in: libs/scene/src/material/meshmaterial.ts:555
Whether TAA is disabled for this material.
- When true, motion vectors encode a large sentinel to skip TAA accumulation.
- Managed via an internal feature toggle.
Returns
boolean
Set Signature
set TAADisabled(
val):void
Defined in: libs/scene/src/material/meshmaterial.ts:558
Parameters
val
boolean
Returns
void
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).TAADisabled
TAAStrength
Get Signature
get TAAStrength():
number
Defined in: libs/scene/src/material/meshmaterial.ts:566
TAA strength in [0, 1].
- Higher values generally imply stronger accumulation.
- The value is mapped when writing motion-vector outputs during depth pass.
Returns
number
Set Signature
set TAAStrength(
val):void
Defined in: libs/scene/src/material/meshmaterial.ts:569
Parameters
val
number
Returns
void
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).TAAStrength
alphaToCoverage
Get Signature
get alphaToCoverage():
boolean
Defined in: libs/scene/src/material/meshmaterial.ts:581
Alpha-to-coverage toggle.
- Useful to approximate transparency for MSAA targets.
- Managed as a shader feature; toggling rebuilds variants.
Returns
boolean
Set Signature
set alphaToCoverage(
val):void
Defined in: libs/scene/src/material/meshmaterial.ts:584
Parameters
val
boolean
Returns
void
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).alphaToCoverage
blendMode
Get Signature
get blendMode():
BlendMode
Defined in: libs/scene/src/material/meshmaterial.ts:592
Blending mode of this material.
- 'none' for opaque, 'blend' for standard alpha, 'additive' for emissive FX.
- Changing the mode toggles an internal feature and rebuilds variants.
Returns
Set Signature
set blendMode(
val):void
Defined in: libs/scene/src/material/meshmaterial.ts:595
Parameters
val
Returns
void
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).blendMode
transparentShadowCaster
Get Signature
get transparentShadowCaster():
boolean
Defined in: libs/scene/src/material/meshmaterial.ts:606
Whether transparent visible materials cast shadow through a masked shadow-only path.
- Visible rendering stays blended.
- Shadow-map rendering is treated like a cutout material using
shadowAlphaCutoff.
Returns
boolean
Set Signature
set transparentShadowCaster(
val):void
Defined in: libs/scene/src/material/meshmaterial.ts:609
Parameters
val
boolean
Returns
void
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).transparentShadowCaster
shadowAlphaCutoff
Get Signature
get shadowAlphaCutoff():
number
Defined in: libs/scene/src/material/meshmaterial.ts:618
Alpha cutoff used by the shadow-only masked caster path.
Returns
number
Set Signature
set shadowAlphaCutoff(
val):void
Defined in: libs/scene/src/material/meshmaterial.ts:621
Parameters
val
number
Returns
void
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).shadowAlphaCutoff
cullMode
Get Signature
get cullMode():
FaceMode
Defined in: libs/scene/src/material/meshmaterial.ts:632
Face culling mode: 'none' | 'front' | 'back'.
- Does not force shader rebuild; affects rasterizer state.
Returns
FaceMode
Set Signature
set cullMode(
val):void
Defined in: libs/scene/src/material/meshmaterial.ts:635
Parameters
val
FaceMode
Returns
void
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).cullMode
opacity
Get Signature
get opacity():
number
Defined in: libs/scene/src/material/meshmaterial.ts:645
Material opacity in [0, 1].
- Used in transparent passes. Changing marks uniforms dirty only.
Returns
number
Set Signature
set opacity(
val):void
Defined in: libs/scene/src/material/meshmaterial.ts:648
Parameters
val
number
Returns
void
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).opacity
objectColor
Get Signature
get objectColor():
Immutable<Vector4>
Defined in: libs/scene/src/material/meshmaterial.ts:659
Per-object color used for GPU picking/object-ID pass.
- Changing marks uniforms dirty only.
Returns
Immutable<Vector4>
Set Signature
set objectColor(
val):void
Defined in: libs/scene/src/material/meshmaterial.ts:662
Parameters
val
Immutable<Vector4>
Returns
void
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).objectColor
MAX_DETAIL_MAP_COUNT
Get Signature
get
staticMAX_DETAIL_MAP_COUNT():number
Defined in: libs/scene/src/material/terrain-cm.ts:94
Returns
number
debugMode
Get Signature
get debugMode():
TerrainDebugMode
Defined in: libs/scene/src/material/terrain-cm.ts:97
Returns
Set Signature
set debugMode(
mode):void
Defined in: libs/scene/src/material/terrain-cm.ts:100
Parameters
mode
Returns
void
numDetailMaps
Get Signature
get numDetailMaps():
number
Defined in: libs/scene/src/material/terrain-cm.ts:139
Returns
number
Set Signature
set numDetailMaps(
val):void
Defined in: libs/scene/src/material/terrain-cm.ts:142
Parameters
val
number
Returns
void
heightMap
Get Signature
get heightMap():
Texture2D<unknown>
Defined in: libs/scene/src/material/terrain-cm.ts:298
Returns
Texture2D<unknown>
Set Signature
set heightMap(
val):void
Defined in: libs/scene/src/material/terrain-cm.ts:301
Parameters
val
Texture2D
Returns
void
Methods
on()
on<
K>(type,listener,context?):void
Defined in: libs/base/dist/index.d.ts:594
IEventTarget.on
Type Parameters
K
K extends "dispose"
Parameters
type
K
listener
EventListener<{ dispose: []; }, K>
context?
unknown
Returns
void
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).on
once()
once<
K>(type,listener,context?):void
Defined in: libs/base/dist/index.d.ts:598
IEventTarget.once
Type Parameters
K
K extends "dispose"
Parameters
type
K
listener
EventListener<{ dispose: []; }, K>
context?
unknown
Returns
void
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).once
off()
off<
K>(type,listener?,context?):void
Defined in: libs/base/dist/index.d.ts:602
IEventTarget.off
Type Parameters
K
K extends "dispose"
Parameters
type
K
listener?
EventListener<{ dispose: []; }>
context?
unknown
Returns
void
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).off
dispatchEvent()
dispatchEvent<
K>(type, ...args):void
Defined in: libs/base/dist/index.d.ts:606
IEventTarget.dispatchEvent
Type Parameters
K
K extends "dispose"
Parameters
type
K
args
...object[K]
Returns
void
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).dispatchEvent
dispose()
dispose():
void
Defined in: libs/base/dist/index.d.ts:6066
Returns
void
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).dispose
isBatchable()
isBatchable():
boolean
Defined in: libs/scene/src/material/material.ts:234
Returns true if this is a instance of material
Returns
boolean
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).isBatchable
applyUniforms()
applyUniforms(
bindGroup,ctx,needUpdate,pass):void
Defined in: libs/scene/src/material/material.ts:415
Conditionally update uniforms/resources into the material bind group.
Delegates to _applyUniforms() when needUpdate is true (based on _optionTag check).
Parameters
bindGroup
BindGroup
Material bind group at index 2 (may be null if program has no layout).
ctx
Draw context.
needUpdate
boolean
Whether uniforms need to be refreshed.
pass
number
Pass index.
Returns
void
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).applyUniforms
clearCache()
clearCache():
void
Defined in: libs/scene/src/material/material.ts:440
Returns
void
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).clearCache
passToHash()
passToHash(
pass):string
Defined in: libs/scene/src/material/material.ts:456
Convert a pass index to a hash seed string.
Subclasses may override to encode per-pass role (e.g., "depth", "forward", "shadow").
Parameters
pass
number
Pass number.
Returns
string
String used when building full hash.
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).passToHash
drawPrimitive()
drawPrimitive(
pass,primitive,ctx,numInstances):void
Defined in: libs/scene/src/material/material.ts:484
Issue the actual draw call for a pass.
Override for custom per-pass draw behavior if necessary. The default implementation:
- Draws instanced if
numInstances > 0. - Else uses
ctx.instanceData.numInstancesif available. - Else issues a non-instanced draw.
Parameters
pass
number
Pass number.
primitive
Primitive to draw.
ctx
Draw context.
numInstances
number
Explicit instance count (0 = auto).
Returns
void
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).drawPrimitive
clone()
clone():
MeshMaterial
Defined in: libs/scene/src/material/meshmaterial.ts:209
Create a shallow clone of this material. Subclasses should override to copy custom fields.
Returns
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).clone
copyFrom()
copyFrom(
other):void
Defined in: libs/scene/src/material/meshmaterial.ts:220
Copy common MeshMaterial properties from another material. Call super.copyFrom(other) first when overriding in subclasses.
Parameters
other
this
Source material.
Returns
void
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).copyFrom
apply()
apply(
ctx):boolean
Defined in: libs/scene/src/material/meshmaterial.ts:241
Capture the active draw context for both cached and freshly-built program paths.
The shader-building hooks access this.drawContext, but uniform application may also consult it on subsequent frames when the GPU program is reused from cache. Updating it here keeps material mixins in sync even when createProgram() is skipped.
Parameters
ctx
Current draw context.
Returns
boolean
Whether material preparation succeeded.
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).apply
uniformChanged()
uniformChanged():
void
Defined in: libs/scene/src/material/meshmaterial.ts:250
Mark uniform-only changes so uniforms are re-uploaded on next apply, without rebuilding shader programs.
Returns
void
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).uniformChanged
defineFeature()
staticdefineFeature():number
Defined in: libs/scene/src/material/meshmaterial.ts:257
Define a new feature bit/index for shader variants. Subclasses may use this to add their own switches.
Returns
number
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).defineFeature
defineInstanceUniform()
staticdefineInstanceUniform(prop,type,name?):number
Defined in: libs/scene/src/material/meshmaterial.ts:290
Define a per-instance uniform for this class.
Returns a compact index encoding the vector index and component offset, which can be used in shader code via getInstancedUniform(...).
Parameters
prop
string
Property name exposed on instances.
type
Uniform data type.
name?
string = ''
Returns
number
Encoded index for use in getInstancedUniform.
Throws
If the property is already defined or type is invalid.
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).defineInstanceUniform
getInstancedUniform()
getInstancedUniform(
scope,uniformIndex):PBShaderExp
Defined in: libs/scene/src/material/meshmaterial.ts:331
Read an encoded per-instance uniform in shader code.
Encoded index packs: vector index, component offset, and component count.
Parameters
scope
PBInsideFunctionScope
Inside-function shader scope.
uniformIndex
number
Encoded index from defineInstanceUniform.
Returns
PBShaderExp
The shader expression reading the selected components.
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).getInstancedUniform
getInstancedUniforms()
getInstancedUniforms():
object[]
Defined in: libs/scene/src/material/meshmaterial.ts:353
Get the list of per-instance uniforms for this material class.
Returns
object[]
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).getInstancedUniforms
createInstance()
createInstance():
this
Defined in: libs/scene/src/material/meshmaterial.ts:368
Create a material instance (preferred for GPU instancing).
- On WebGL1 (or when instancing unsupported), falls back to cloning.
- Otherwise, returns a proxy instance that shares GPU programs and stores per-instance uniforms in a compact Float32Array.
The returned instance:
- Exposes properties defined by
defineInstanceUniformwith getter/setter that read/write the packed buffer and notifyRenderBundleWrapper. - Delegates methods to the core material via prototype chain.
Returns
this
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).createInstance
getEffectiveBlendMode()
protectedgetEffectiveBlendMode(pass,ctx?):BlendMode
Defined in: libs/scene/src/material/meshmaterial.ts:681
Returns the effective blend mode for the current pass. Transparent-shadow-caster materials stay blended in visible passes, but become masked in shadow passes.
Parameters
pass
number
ctx?
Returns
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).getEffectiveBlendMode
getActiveAlphaCutoff()
protectedgetActiveAlphaCutoff(ctx?,pass?):number
Defined in: libs/scene/src/material/meshmaterial.ts:694
Returns the alpha cutoff that should be used for the current pass.
Parameters
ctx?
pass?
number = ...
Returns
number
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).getActiveAlphaCutoff
useTransparentShadowCaster()
useTransparentShadowCaster(
ctx?,_pass?):boolean
Defined in: libs/scene/src/material/meshmaterial.ts:700
Whether the current pass should use the shadow-only masked caster path.
Parameters
ctx?
_pass?
number = ...
Returns
boolean
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).useTransparentShadowCaster
useTransparentShadowCasterForPass()
useTransparentShadowCasterForPass(
renderPassType?):boolean
Defined in: libs/scene/src/material/meshmaterial.ts:706
Whether the specified render pass type should reinterpret this transparent material as a masked shadow caster.
Parameters
renderPassType?
number
Returns
boolean
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).useTransparentShadowCasterForPass
usesAlphaCutoff()
protectedusesAlphaCutoff(ctx?,pass?):boolean
Defined in: libs/scene/src/material/meshmaterial.ts:716
Whether this pass needs an alpha-cutoff uniform bound.
Parameters
ctx?
pass?
number = ...
Returns
boolean
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).usesAlphaCutoff
needFragmentColorInput()
needFragmentColorInput(
ctx?):boolean
Defined in: libs/scene/src/material/meshmaterial.ts:724
Whether this pass needs fragment color inputs. This stays aligned with the historical meaning of needFragmentColor, but also allows shadow-only transparent casters to fetch alpha sources.
Parameters
ctx?
Returns
boolean
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).needFragmentColorInput
updateRenderStates()
protectedupdateRenderStates(pass,stateSet,ctx):void
Defined in: libs/scene/src/material/meshmaterial.ts:737
Update render states per pass and draw context. Sets blending, alpha-to-coverage, depth test/write, cull mode, color mask, and cooperates with OIT.
Parameters
pass
number
Current material pass index.
stateSet
RenderStateSet
Render state set to update.
ctx
Current draw context.
Returns
void
void
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).updateRenderStates
getQueueType()
getQueueType():
number
Defined in: libs/scene/src/material/meshmaterial.ts:830
Determine the render queue for this material. Transparent materials are queued as QUEUE_TRANSPARENT, otherwise QUEUE_OPAQUE.
Returns
number
The queue type constant.
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).getQueueType
isTransparentPass()
isTransparentPass(
pass,ctx?):boolean
Defined in: libs/scene/src/material/meshmaterial.ts:840
Whether the given pass is transparent. Default returns true when blendMode !== 'none'.
Parameters
pass
number
Material pass index.
ctx?
Returns
boolean
True if the pass is transparent; otherwise false.
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).isTransparentPass
featureUsed()
featureUsed<
T>(feature):T
Defined in: libs/scene/src/material/meshmaterial.ts:867
Query a feature flag’s current value.
Type Parameters
T
T = unknown
Expected value type.
Parameters
feature
number
The feature index.
Returns
T
The current value for the feature, typed as T.
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).featureUsed
useFeature()
useFeature(
feature,use):void
Defined in: libs/scene/src/material/meshmaterial.ts:878
Enable or disable a feature and trigger variant rebuild when changed. Calls optionChanged(true) internally on change.
Parameters
feature
number
The feature index to set.
use
unknown
The new feature value (typed by convention).
Returns
void
void
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).useFeature
needFragmentColor()
needFragmentColor(
ctx?):boolean
Defined in: libs/scene/src/material/meshmaterial.ts:917
Whether the fragment shader needs to compute color. Returns true for LIGHT pass, or when alpha test or alpha-to-coverage is enabled. Override if the material writes color in other passes.
Parameters
ctx?
Optional draw context; defaults to the last captured drawContext.
Returns
boolean
True if fragment color computation is needed; otherwise false.
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).needFragmentColor
outputFragmentColor()
outputFragmentColor(
scope,worldPos,color,ssrRoughness?,ssrNormal?,sssProfile?,sssParams?,sssDiffuse?,sssTransmission?,sssProfileEnabled?,skinSSS?):void
Defined in: libs/scene/src/material/meshmaterial.ts:1069
Centralized final color write and per-pass output composition.
Behavior by pass:
- LIGHT: clipping, alpha handling, optional OIT integration, fog application, color output encoding.
- DEPTH: encoded depth; optional motion vectors (TAA enabled/disabled handling).
- OBJECT_COLOR: object color and distance output (linear depth or world-pos + distance).
- SHADOWMAP: writes shadow depth via light’s shadow implementation.
Also writes SSR roughness/normal buffers when requested via material flags.
Parameters
scope
PBInsideFunctionScope
Inside-function shader scope.
worldPos
PBShaderExp
Fragment world-space position expression.
color
PBShaderExp
Lit fragment color expression; may be undefined for depth-only paths.
ssrRoughness?
PBShaderExp
Optional SSR roughness output expression.
ssrNormal?
PBShaderExp
Optional SSR normal output expression.
sssProfile?
PBShaderExp
Optional SSS profile output expression.
sssParams?
PBShaderExp
Optional SSS packed params output expression.
sssDiffuse?
PBShaderExp
Optional diffuse-only lighting color for SSS composition.
sssTransmission?
PBShaderExp
Optional thin-shell transmission lighting color for SSS composition.
sssProfileEnabled?
boolean = false
True only when this material should write SSS profile data.
skinSSS?
PBShaderExp
Returns
void
void
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).outputFragmentColor
PBRLight()
PBRLight(
scope,worldPos,normal,viewVec,albedo,TBN,outRoughness?,outSSSDiffuse?,outSSSTransmission?):PBShaderExp
Defined in: libs/scene/src/material/mixins/lightmodel/pbrmetallicroughness.ts:46
Parameters
scope
PBInsideFunctionScope
worldPos
PBShaderExp
normal
PBShaderExp
viewVec
PBShaderExp
albedo
PBShaderExp
TBN
PBShaderExp
outRoughness?
PBShaderExp
outSSSDiffuse?
PBShaderExp
outSSSTransmission?
PBShaderExp
Returns
PBShaderExp
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).PBRLight
calculateMetallic()
calculateMetallic(
scope,albedo,normal):PBShaderExp
Defined in: libs/scene/src/material/mixins/lightmodel/pbrmetallicroughness.ts:57
Parameters
scope
PBInsideFunctionScope
albedo
PBShaderExp
normal
PBShaderExp
Returns
PBShaderExp
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).calculateMetallic
calculateRoughness()
calculateRoughness(
scope,albedo,normal):PBShaderExp
Defined in: libs/scene/src/material/mixins/lightmodel/pbrmetallicroughness.ts:58
Parameters
scope
PBInsideFunctionScope
albedo
PBShaderExp
normal
PBShaderExp
Returns
PBShaderExp
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).calculateRoughness
calculateSpecularFactor()
calculateSpecularFactor(
scope,albedo,normal):PBShaderExp
Defined in: libs/scene/src/material/mixins/lightmodel/pbrmetallicroughness.ts:59
Parameters
scope
PBInsideFunctionScope
albedo
PBShaderExp
normal
PBShaderExp
Returns
PBShaderExp
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).calculateSpecularFactor
calculateCommonData()
calculateCommonData(
scope,albedo,normal,viewVec,TBN,data):void
Defined in: libs/scene/src/material/mixins/lightmodel/pbrmetallicroughness.ts:64
Parameters
scope
PBInsideFunctionScope
albedo
PBShaderExp
normal
PBShaderExp
viewVec
PBShaderExp
TBN
PBShaderExp
data
PBShaderExp
Returns
void
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).calculateCommonData
needCalculateEnvLight()
needCalculateEnvLight():
boolean
Defined in: libs/scene/src/material/mixins/lit.ts:26
Returns
boolean
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).needCalculateEnvLight
getUniformNormalScale()
getUniformNormalScale(
scope):PBShaderExp
Defined in: libs/scene/src/material/mixins/lit.ts:27
Parameters
scope
PBInsideFunctionScope
Returns
PBShaderExp
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).getUniformNormalScale
getEnvLightIrradiance()
getEnvLightIrradiance(
scope,normal):PBShaderExp
Defined in: libs/scene/src/material/mixins/lit.ts:28
Parameters
scope
PBInsideFunctionScope
normal
PBShaderExp
Returns
PBShaderExp
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).getEnvLightIrradiance
getEnvLightRadiance()
getEnvLightRadiance(
scope,reflectVec,roughness):PBShaderExp
Defined in: libs/scene/src/material/mixins/lit.ts:29
Parameters
scope
PBInsideFunctionScope
reflectVec
PBShaderExp
roughness
PBShaderExp
Returns
PBShaderExp
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).getEnvLightRadiance
calculateViewVector()
calculateViewVector(
scope,worldPos):PBShaderExp
Defined in: libs/scene/src/material/mixins/lit.ts:34
Parameters
scope
PBInsideFunctionScope
worldPos
PBShaderExp
Returns
PBShaderExp
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).calculateViewVector
calculateReflectionVector()
calculateReflectionVector(
scope,normal,viewVec):PBShaderExp
Defined in: libs/scene/src/material/mixins/lit.ts:35
Parameters
scope
PBInsideFunctionScope
normal
PBShaderExp
viewVec
PBShaderExp
Returns
PBShaderExp
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).calculateReflectionVector
calculateTBN()
calculateTBN(
scope,worldPos,worldNormal?,worldTangent?,worldBinormal?):PBShaderExp
Defined in: libs/scene/src/material/mixins/lit.ts:40
Parameters
scope
PBInsideFunctionScope
worldPos
PBShaderExp
worldNormal?
PBShaderExp
worldTangent?
PBShaderExp
worldBinormal?
PBShaderExp
Returns
PBShaderExp
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).calculateTBN
calculateNormal()
calculateNormal(
scope,worldPos,worldNormal?,worldTangent?,worldBinormal?):PBShaderExp
Defined in: libs/scene/src/material/mixins/lit.ts:47
Parameters
scope
PBInsideFunctionScope
worldPos
PBShaderExp
worldNormal?
PBShaderExp
worldTangent?
PBShaderExp
worldBinormal?
PBShaderExp
Returns
PBShaderExp
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).calculateNormal
calculateNormalAndTBN()
calculateNormalAndTBN(
scope,worldPos,worldNormal?,worldTangent?,worldBinormal?):PBShaderExp
Defined in: libs/scene/src/material/mixins/lit.ts:54
Parameters
scope
PBInsideFunctionScope
worldPos
PBShaderExp
worldNormal?
PBShaderExp
worldTangent?
PBShaderExp
worldBinormal?
PBShaderExp
Returns
PBShaderExp
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).calculateNormalAndTBN
calculateLightAttenuation()
calculateLightAttenuation(
scope,type,worldPos,posRange,dirCutoff):PBShaderExp
Defined in: libs/scene/src/material/mixins/lit.ts:61
Parameters
scope
PBInsideFunctionScope
type
PBShaderExp
worldPos
PBShaderExp
posRange
PBShaderExp
dirCutoff
PBShaderExp
Returns
PBShaderExp
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).calculateLightAttenuation
calculateLightDirection()
calculateLightDirection(
scope,type,worldPos,posRange,dirCutoff):PBShaderExp
Defined in: libs/scene/src/material/mixins/lit.ts:68
Parameters
scope
PBInsideFunctionScope
type
PBShaderExp
worldPos
PBShaderExp
posRange
PBShaderExp
dirCutoff
PBShaderExp
Returns
PBShaderExp
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).calculateLightDirection
calculateShadow()
calculateShadow(
scope,worldPos,NoL):PBShaderExp
Defined in: libs/scene/src/material/mixins/lit.ts:75
Parameters
scope
PBInsideFunctionScope
worldPos
PBShaderExp
NoL
PBShaderExp
Returns
PBShaderExp
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).calculateShadow
forEachLight()
forEachLight(
scope,callback):void
Defined in: libs/scene/src/material/mixins/lit.ts:76
Parameters
scope
PBInsideFunctionScope
callback
(this, type, posRange, dirCutoff, colorIntensity, extra, shadow) => void
Returns
void
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).forEachLight
fresnelSchlick()
fresnelSchlick(
scope,cosTheta,F0,F90):PBShaderExp
Defined in: libs/scene/src/material/mixins/pbr/brdf.ts:10
Parameters
scope
PBInsideFunctionScope
cosTheta
PBShaderExp
F0
PBShaderExp
F90
PBShaderExp
Returns
PBShaderExp
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).fresnelSchlick
distributionGGX()
distributionGGX(
scope,NdotH,alphaRoughness):PBShaderExp
Defined in: libs/scene/src/material/mixins/pbr/brdf.ts:16
Parameters
scope
PBInsideFunctionScope
NdotH
PBShaderExp
alphaRoughness
PBShaderExp
Returns
PBShaderExp
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).distributionGGX
visGGX()
visGGX(
scope,NdotV,NdotL,alphaRoughness):PBShaderExp
Defined in: libs/scene/src/material/mixins/pbr/brdf.ts:17
Parameters
scope
PBInsideFunctionScope
NdotV
PBShaderExp
NdotL
PBShaderExp
alphaRoughness
PBShaderExp
Returns
PBShaderExp
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).visGGX
getCommonData()
getCommonData(
scope,albedo,normal,viewVec,TBN):PBShaderExp
Defined in: libs/scene/src/material/mixins/pbr/common.ts:51
Parameters
scope
PBInsideFunctionScope
albedo
PBShaderExp
normal
PBShaderExp
viewVec
PBShaderExp
TBN
PBShaderExp
Returns
PBShaderExp
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).getCommonData
getCommonDatasStruct()
getCommonDatasStruct(
scope):ShaderTypeFunc
Defined in: libs/scene/src/material/mixins/pbr/common.ts:66
Parameters
scope
PBInsideFunctionScope
Returns
ShaderTypeFunc
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).getCommonDatasStruct
calculateEmissiveColor()
calculateEmissiveColor(
scope):PBShaderExp
Defined in: libs/scene/src/material/mixins/pbr/common.ts:67
Parameters
scope
PBInsideFunctionScope
Returns
PBShaderExp
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).calculateEmissiveColor
getF0()
getF0(
scope):PBShaderExp
Defined in: libs/scene/src/material/mixins/pbr/common.ts:68
Parameters
scope
PBInsideFunctionScope
Returns
PBShaderExp
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).getF0
getSheenAlbedoScaling()
getSheenAlbedoScaling(
scope,Ndot,sheenColor,sheenRoughness):PBShaderExp
Defined in: libs/scene/src/material/mixins/pbr/common.ts:69
Parameters
scope
PBInsideFunctionScope
Ndot
PBShaderExp
sheenColor
PBShaderExp
sheenRoughness
PBShaderExp
Returns
PBShaderExp
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).getSheenAlbedoScaling
getSheenAlbedoScalingForDirect()
getSheenAlbedoScalingForDirect(
scope,NoV,NoL,sheenColor,sheenRoughness):PBShaderExp
Defined in: libs/scene/src/material/mixins/pbr/common.ts:75
Parameters
scope
PBInsideFunctionScope
NoV
PBShaderExp
NoL
PBShaderExp
sheenColor
PBShaderExp
sheenRoughness
PBShaderExp
Returns
PBShaderExp
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).getSheenAlbedoScalingForDirect
directLighting()
directLighting(
scope,lightDir,lightColor,normal,viewVec,commonData,diffuseScale,specularScale,sourceRadiusFactor,outColor):void
Defined in: libs/scene/src/material/mixins/pbr/common.ts:82
Parameters
scope
PBInsideFunctionScope
lightDir
PBShaderExp
lightColor
PBShaderExp
normal
PBShaderExp
viewVec
PBShaderExp
commonData
PBShaderExp
diffuseScale
PBShaderExp
specularScale
PBShaderExp
sourceRadiusFactor
PBShaderExp
outColor
PBShaderExp
Returns
void
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).directLighting
directRectLight()
directRectLight(
scope,worldPos,normal,viewVec,commonData,posRange,axisX,axisY,colorIntensity,outColor):void
Defined in: libs/scene/src/material/mixins/pbr/common.ts:94
Parameters
scope
PBInsideFunctionScope
worldPos
PBShaderExp
normal
PBShaderExp
viewVec
PBShaderExp
commonData
PBShaderExp
posRange
PBShaderExp
axisX
PBShaderExp
axisY
PBShaderExp
colorIntensity
PBShaderExp
outColor
PBShaderExp
Returns
void
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).directRectLight
indirectLighting()
indirectLighting(
scope,normal,viewVec,commonData,outColor,outRoughness?,outDiffuseColor?):void
Defined in: libs/scene/src/material/mixins/pbr/common.ts:106
Parameters
scope
PBInsideFunctionScope
normal
PBShaderExp
viewVec
PBShaderExp
commonData
PBShaderExp
outColor
PBShaderExp
outRoughness?
PBShaderExp
outDiffuseColor?
PBShaderExp
Returns
void
Inherited from
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).indirectLighting
setClipmapGridInfo()
setClipmapGridInfo(
gridScale,gridOffsetX,gridOffsetY):void
Defined in: libs/scene/src/material/terrain-cm.ts:118
Parameters
gridScale
number
gridOffsetX
number
gridOffsetY
number
Returns
void
getSplatMap()
getSplatMap():
Texture2D<unknown> |Texture2DArray<unknown>
Defined in: libs/scene/src/material/terrain-cm.ts:177
Returns
Texture2D<unknown> | Texture2DArray<unknown>
setSplatMap()
setSplatMap(
tex):void
Defined in: libs/scene/src/material/terrain-cm.ts:180
Parameters
tex
Texture2DArray
Returns
void
getDetailMapUVScale()
getDetailMapUVScale(
index):number
Defined in: libs/scene/src/material/terrain-cm.ts:190
Parameters
index
number
Returns
number
setDetailMapUVScale()
setDetailMapUVScale(
index,scale):void
Defined in: libs/scene/src/material/terrain-cm.ts:197
Parameters
index
number
scale
number
Returns
void
getDetailMapRoughness()
getDetailMapRoughness(
index):number
Defined in: libs/scene/src/material/terrain-cm.ts:207
Parameters
index
number
Returns
number
setDetailMapRoughness()
setDetailMapRoughness(
index,val):void
Defined in: libs/scene/src/material/terrain-cm.ts:214
Parameters
index
number
val
number
Returns
void
getDetailMap()
getDetailMap(
index):Texture2D<unknown>
Defined in: libs/scene/src/material/terrain-cm.ts:224
Parameters
index
number
Returns
Texture2D<unknown>
setDetailMap()
setDetailMap(
index,albedoMap):void
Defined in: libs/scene/src/material/terrain-cm.ts:231
Parameters
index
number
albedoMap
Texture2D<unknown>
Returns
void
getDetailNormalMap()
getDetailNormalMap(
index):Texture2D<unknown>
Defined in: libs/scene/src/material/terrain-cm.ts:257
Parameters
index
number
Returns
Texture2D<unknown>
setDetailNormalMap()
setDetailNormalMap(
index,normalMap):void
Defined in: libs/scene/src/material/terrain-cm.ts:264
Parameters
index
number
normalMap
Texture2D<unknown>
Returns
void
needSceneColor()
needSceneColor():
boolean
Defined in: libs/scene/src/material/terrain-cm.ts:313
Whether this material requires the scene color texture (e.g., for refraction).
Returns
boolean
Overrides
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).needSceneColor
needSceneDepth()
needSceneDepth():
boolean
Defined in: libs/scene/src/material/terrain-cm.ts:316
Whether this material requires the linear scene depth texture (e.g., for depth-aware effects).
Returns
boolean
Overrides
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).needSceneDepth
supportInstancing()
supportInstancing():
boolean
Defined in: libs/scene/src/material/terrain-cm.ts:319
Whether this material supports hardware instancing.
Override and return false if per-instance data is not supported in the shader.
Returns
boolean
Overrides
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).supportInstancing
supportLighting()
supportLighting():
boolean
Defined in: libs/scene/src/material/terrain-cm.ts:322
Whether this material responds to scene lighting. Override to return false for unlit materials.
Returns
boolean
True if lighting affects this material; otherwise false.
Overrides
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).supportLighting
sampleDetailNormalMap()
sampleDetailNormalMap(
scope,index,texCoord):PBShaderExp
Defined in: libs/scene/src/material/terrain-cm.ts:328
Parameters
scope
PBInsideFunctionScope
index
number
texCoord
PBShaderExp
Returns
PBShaderExp
calculateDetailNormal()
calculateDetailNormal(
scope,TBN):any
Defined in: libs/scene/src/material/terrain-cm.ts:337
Parameters
scope
PBInsideFunctionScope
TBN
PBShaderExp
Returns
any
calculateAlbedoColor()
calculateAlbedoColor(
scope):PBShaderExp
Defined in: libs/scene/src/material/terrain-cm.ts:364
Parameters
scope
PBInsideFunctionScope
Returns
PBShaderExp
Overrides
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).calculateAlbedoColor
sampleHeightMap()
sampleHeightMap(
scope,uv,pos,levelStart,levelDiff):any
Defined in: libs/scene/src/material/terrain-cm.ts:413
Parameters
scope
PBInsideFunctionScope
uv
PBShaderExp
pos
PBShaderExp
levelStart
PBShaderExp
levelDiff
PBShaderExp
Returns
any
calculateTerrainTBN()
calculateTerrainTBN(
scope,clipmapPos,uv,texSize,scale,levelStart,levelDiff,tangent,bitangent,normal):PBShaderExp
Defined in: libs/scene/src/material/terrain-cm.ts:453
Parameters
scope
PBInsideFunctionScope
clipmapPos
PBShaderExp
uv
PBShaderExp
texSize
PBShaderExp
scale
PBShaderExp
levelStart
PBShaderExp
levelDiff
PBShaderExp
tangent
PBShaderExp
bitangent
PBShaderExp
normal
PBShaderExp
Returns
PBShaderExp
vertexShader()
vertexShader(
scope):void
Defined in: libs/scene/src/material/terrain-cm.ts:536
Vertex shader hook. Prepares common inputs (skin/morph/instancing), varyings, and pass-dependent outputs. Override to implement per-vertex logic; use ShaderHelper as needed.
Parameters
scope
PBFunctionScope
Vertex shader function scope.
Returns
void
void
Overrides
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).vertexShader
fragmentShader()
fragmentShader(
scope):void
Defined in: libs/scene/src/material/terrain-cm.ts:634
Fragment shader hook. Declares pass-dependent uniforms (e.g., opacity, objectColor, alphaCutoff). Override to implement per-fragment logic, and call outputFragmentColor to finalize writes.
Parameters
scope
PBFunctionScope
Fragment shader function scope.
Returns
void
void
Overrides
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).fragmentShader
applyUniformValues()
applyUniformValues(
bindGroup,ctx,pass):void
Defined in: libs/scene/src/material/terrain-cm.ts:723
Submit material uniforms/resources to the material bind group (set 2). Handles alpha cutoff, opacity (non-instanced transparent), OIT, object color, and TAA strength.
Parameters
bindGroup
BindGroup
The material bind group to write into.
ctx
Current draw context.
pass
number
Current material pass index.
Returns
void
void
Overrides
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).applyUniformValues
onDispose()
protectedonDispose():void
Defined in: libs/scene/src/material/terrain-cm.ts:817
Dispose the material and release GPU-side resource references.
- Unregisters from the global registry.
- Disposes the per-material bind groups kept in
_states.
Returns
void
Overrides
applyMaterialMixins( MeshMaterial, mixinLight, mixinPBRMetallicRoughness ).onDispose
getDefaultDetailMap()
staticgetDefaultDetailMap():Texture2D<unknown>
Defined in: libs/scene/src/material/terrain-cm.ts:833
Returns
Texture2D<unknown>
getDefaultNormalMap()
staticgetDefaultNormalMap():Texture2D<unknown>
Defined in: libs/scene/src/material/terrain-cm.ts:842
Returns
Texture2D<unknown>