Face-culling mode used when a pass builds this material's render pipeline:
'back' (default) culls back faces, 'front' culls front faces, 'none'
draws both sides. A per-draw doubleSided flag (e.g. mixed-winding tile
content) forces 'none' regardless of this setting. Passes fold this into
their pipeline cache key, so it may differ between instances sharing a
shaderId.
ReadonlyshaderStable per-subclass identifier. All instances with the same shaderId
MUST produce identical getShaderCode output and identical
getBindGroupLayout layouts on a given device — the pass uses this
as the pipeline cache key.
Dielectric specular reflectance scalar (F0 = 0.08·specular). Default 0.5.
Dielectric specular color tint (F0 rgb). Default [1,1,1].
Clear-coat strength (KHR_materials_clearcoat). Default 0 (no coat).
Clear-coat roughness. Default 0.
Coat uses the smooth geometric normal instead of the base normal. Default false.
Cloth diffuse-wrap strength [0,1] (Filament cloth). Default 0.
Sheen color (KHR_materials_sheen). Default [0,0,0] (no sheen).
Sheen roughness. Default 0.
Thin-film iridescence strength (KHR_materials_iridescence). Default 0.
Thin-film IOR. Default 1.3.
Thin-film thickness in nm. Default 400.
Diffuse transmission strength (KHR_materials_diffuse_transmission). Default 0.
Transmitted diffuse tint. Default [1,1,1].
Subsurface scattering strength (engine shading model). Default 0 (off).
Subsurface scattered-light tint. Default [1,1,1].
Refractive transmission strength (KHR_materials_transmission). Default 0.
Index of refraction (KHR_materials_ior). Default 1.5.
Volume thickness in world units (KHR_materials_volume). Default 0 (thin).
Beer-Lambert absorption color. Default [1,1,1] (none).
Absorption distance. Default Infinity (none).
Chromatic dispersion strength (KHR_materials_dispersion). Default 0.
OptionaluvOptionaluvOptionaluvUV rotation in radians (glTF KHR_texture_transform). Default 0.
MASK alpha-test threshold; 0 disables (glTF alphaCutoff). Default 0.
Nearest (point) texture filtering instead of linear. Default false.
Tangent-space normal XY multiplier (glTF normalTexture.scale). Default 1.
Unlit shading (KHR_materials_unlit) — skips lighting/IBL. Default false.
Anisotropy strength (KHR_materials_anisotropy). Default 0 (isotropic).
Anisotropy direction angle in radians. Default 0.
Per-texture UV-set selector bitmask (glTF texCoord); see PbrMaterialOptions.texCoordMask. Default 0.
OptionaltransmissionPer-pixel transmission/thickness maps — read by the TransmissionPass, not part of this material's group-2 bind group.
OptionalthicknessReturns the WGSL source for a given pass type and variant mask.
Which pass is asking.
Optional_variantMask: numberWGSL source.
Returns the bind group layout for slot MATERIAL_GROUP. Implementations
MUST cache the layout per device — typically with a static WeakMap<GPUDevice, ...>.
OptionalvariantMaskOverrides: numberReturns the bind group instance for slot MATERIAL_GROUP. Implementations
may cache the bind group internally and recreate it lazily when textures or
other resource references change.
Optional: called by the pass once per draw before binding, so the material can flush any dirty CPU-side parameter changes into its uniform buffers.
Optional: release any GPU resources owned by this material instance (uniform buffers, owned textures). Bind group layouts shared across instances should NOT be destroyed here.
True for alpha-blended materials. ForwardPass routes these through its transparent sub-pass (after opaque) with depth-write disabled.