Interface PbrMaterialProps
alpha?: number;
alphaBlend?: boolean;
baseColorFactor?: [number, number, number, number];
baseColorTexture?: Texture2D;
directIntensity?: number;
doubleSided?: boolean;
emissiveTexture?: Texture2D;
enableSpecularAA?: boolean;
environmentIntensity?: number;
gammaLightmap?: boolean;
lightmapCoordIndex?: 0 | 1;
lightmapLevel?: number;
lightmapTexture?: Texture2D;
metadata?: LiteMetadata;
metallicFactor?: number;
name?: string;
normalTexture?: Texture2D;
normalTextureScale?: number;
occlusionStrength?: number;
occlusionTexCoord?: number;
occlusionTexture?: Texture2D;
ormTexture?: Texture2D;
plugins?: MaterialPlugin[];
reflectance?: number;
roughnessFactor?: number;
specGlossTexture?: Texture2D;
stencil?: StencilState;
useLightmapAsShadowmap?: boolean;
usePhysicalLightFalloff?: boolean;
}
Hierarchy (View Summary)
- Material
- PbrMaterialProps
Index
Properties
Properties
Optionalalpha
Overall material alpha (0=fully transparent, 1=opaque). Default 1.0.
Optionalalpha Blend
Enable alpha blending (glTF alphaMode "BLEND"). Enables radianceOverAlpha + specularOverAlpha.
Optionalbase Color Factor
Linear RGB/A factor multiplied with the base-color texture (glTF baseColorFactor). Default [1,1,1,1].
Optionalbase Color Texture
Optionaldirect Intensity
Scale factor for direct light contribution. Default 1.0.
Optionaldouble Sided
Whether material is double-sided (disables back-face culling).
Optionalemissive Texture
Optionalenable Specular AA
Enable specular anti-aliasing on IBL alphaG (matches BJS SPECULARAA). Default false. Set automatically by the glTF loader for materials loaded from glTF files.
Optionalenvironment Intensity
Scale factor for environment/IBL contribution. Default 1.0.
Optionalgamma Lightmap
Decode the sampled lightmap from sRGB to linear before composition. Default false.
Optionallightmap Coord Index
UV set sampled by the lightmap: 0 = TEXCOORD_0, 1 = TEXCOORD_1. Default 1.
Optionallightmap Level
Lightmap intensity multiplier (Babylon.js lightmapTexture.level). Default 1.0.
Optionallightmap Texture
Baked lightmap texture. Added to the shaded color by default, or multiplied
when useLightmapAsShadowmap is true. Set via setPbrLightmap.
Optionalmetadata
User metadata. glTF loads populate metadata.gltf.extras when source extras exist.
Optionalmetallic Factor
glTF metallicFactor multiplier applied over ORM.b metallic channel. Default 1.0.
Optionalname
Optional human-readable name. Populated by loaders from the source asset (e.g. the glTF material name) so callers can look a material up by name.
Optionalnormal Texture
Optionalnormal Texture Scale
Normal map scale (glTF normalTexture.scale). Default 1.0.
Optionalocclusion Strength
Strength of ambient occlusion from ORM R channel. Default 1.0; 0.0 ignores R channel.
Optionalocclusion Tex Coord
glTF-derived UV set index for the occlusion texture: 0 = first UV set (TEXCOORD_0),
1 = second UV set (TEXCOORD_1). Default 0. Populated only by the glTF loader paths
(gltf-pbr-builder-ext and KHR_texture_basisu). It selects WHICH UV set occlusion samples;
whether UV2 gets plumbed at all is gated by _uv2Mask (occlusion contributes bit 32),
which the slow path computes from this same value — so every occlusion-on-UV1 glTF
material also carries _uv2Mask. Setting this alone (without _uv2Mask) does not force
UV2 plumbing.
Optionalocclusion Texture
Separate occlusion texture sampled with UV2 when occlusionTexCoord=1. R channel is occlusion. When set, ORM.r is NOT used for occlusion.
Optionalorm Texture
Occlusion-Roughness-Metallic packed: R=occ, G=rough, B=metal.
Optionalplugins
Optional opt-in material plugins (custom WGSL + uniforms + samplers layered
on top of the built-in PBR pipeline). Attach via material.plugins = [plugin],
then call enableMaterialPlugins(scene) before registerScene.
Optionalreflectance
Dielectric F0 reflectance (default 0.04, glass ≈ 0.2).
Optionalroughness Factor
glTF roughnessFactor multiplier applied over ORM.g roughness channel. Default 1.0.
Optionalspec Gloss Texture
KHR_materials_pbrSpecularGlossiness: RGB=specular, A=glossiness.
Optionalstencil
Optional stencil-test state baked into the main-pass pipeline. Lets this material write the stencil buffer
where it draws (mask) or discard where another material wrote it. Default none. See StencilState.
Optionaluse Lightmap As Shadowmap
Multiply the shaded color by the lightmap instead of adding it. Default false.
Optionaluse Physical Light Falloff
Whether direct point/spot lights use physical inverse-square falloff.
Default true, matching Babylon.js PBRMaterial. Set false for Standard-style
linear range + spot exponent falloff (usePhysicalLightFalloff = false).
User-facing properties for a physically based (metallic-roughness) material. Create one manually via
createPbrMaterial()or letloadGltf()build it. Optional sub-feature objects (clearcoat, sheen, anisotropy, subsurface) are only bundled when referenced.