Taos API Reference
    Preparing search index...

    Interface PbrMaterialOptions

    interface PbrMaterialOptions {
        albedo?: [number, number, number, number];
        roughness?: number;
        metallic?: number;
        specular?: number;
        specularColor?: [number, number, number];
        clearcoat?: number;
        clearcoatRoughness?: number;
        clearcoatNormalToGeometric?: boolean;
        sheenColor?: [number, number, number];
        sheenRoughness?: number;
        clothWrap?: number;
        iridescence?: number;
        iridescenceIor?: number;
        iridescenceThickness?: number;
        diffuseTransmission?: number;
        diffuseTransmissionColor?: [number, number, number];
        subsurface?: number;
        subsurfaceColor?: [number, number, number];
        transmission?: number;
        ior?: number;
        thickness?: number;
        attenuationColor?: [number, number, number];
        attenuationDistance?: number;
        dispersion?: number;
        emissiveFactor?: [number, number, number];
        uvOffset?: [number, number];
        uvScale?: [number, number];
        uvTile?: [number, number];
        uvRotation?: number;
        alphaCutoff?: number;
        pixelated?: boolean;
        normalScale?: number;
        unlit?: boolean;
        anisotropyStrength?: number;
        anisotropyRotation?: number;
        texCoordMask?: number;
        texTransforms?: (PerTextureUvTransform | null)[];
        albedoMap?: Texture;
        normalMap?: Texture;
        merMap?: Texture;
        emissiveMap?: Texture;
        extMap?: Texture;
        anisotropyMap?: Texture;
        transmissionMap?: Texture;
        thicknessMap?: Texture;
        transparent?: boolean;
    }
    Index

    Properties

    albedo?: [number, number, number, number]
    roughness?: number
    metallic?: number
    specular?: number

    Dielectric specular reflectance scalar in [0,1]: F0 = 0.08 × specular, so the default 0.5 reproduces the usual 0.04. Drives wet/varnished (>0.5) or coated/dulled (<0.5) dielectrics. Ignored for pure metals (metallic = 1, where F0 = albedo). Maps to glTF KHR_materials_specular specularFactor. Has no effect on metals.

    specularColor?: [number, number, number]

    Dielectric specular color tint (glTF KHR_materials_specular specularColorFactor): multiplies the dielectric F0 (0.08 × specular) per channel. Default [1, 1, 1] (white = no tint). Ignored for pure metals.

    clearcoat?: number

    Clear-coat layer strength (glTF KHR_materials_clearcoat clearcoatFactor): a second colorless dielectric specular lobe (IOR 1.5, F0 0.04) over the base material — car paint, lacquer, varnish. Default 0 (no coat). Deferred-path only for now (forward renders the base material without the coat).

    clearcoatRoughness?: number

    Clear-coat layer roughness (glTF clearcoatRoughnessFactor). Default 0 (mirror-smooth coat). Only meaningful when clearcoat > 0.

    clearcoatNormalToGeometric?: boolean

    Decouple the clear-coat normal from the base normal (Filament-style separate clearCoatNormal). When true the coat lobe + its IBL reflection use the smooth geometric normal instead of the normal-mapped base normal — so a glossy coat mirrors the environment cleanly over a bumpy painted base. Default false (coat follows the base normal). Forward-path only for now.

    sheenColor?: [number, number, number]

    Sheen color (glTF KHR_materials_sheen sheenColorFactor): a soft retroreflective fabric lobe (Charlie distribution) added over the base. Default [0, 0, 0] (no sheen). Deferred-path only for now.

    sheenRoughness?: number

    Sheen roughness (glTF sheenRoughnessFactor). Default 0. Only meaningful when sheenColor is non-zero.

    clothWrap?: number

    Cloth-model diffuse wrap strength in [0, 1] (Filament cloth). 0 (default) is standard Lambert; higher values soften the terminator (light wraps past the shadow line) and blend the unlit side toward subsurfaceColor, giving the soft, slightly translucent look of fabric. Pair with sheenColor for a full cloth surface. Forward-path only for now.

    iridescence?: number

    Thin-film iridescence strength (glTF KHR_materials_iridescence iridescenceFactor): a view-angle-dependent rainbow shift of the specular reflectance (soap bubbles, oil slicks, anodized metal). Default 0 (off). Deferred-path only for now.

    iridescenceIor?: number

    Thin-film index of refraction (glTF iridescenceIor). Default 1.3.

    iridescenceThickness?: number

    Thin-film thickness in nanometers (glTF iridescenceThicknessMaximum; the constant value when no thickness texture). Default 400.

    diffuseTransmission?: number

    Diffuse transmission strength (glTF KHR_materials_diffuse_transmission diffuseTransmissionFactor): fraction of diffuse light that scatters through a thin surface — back-lit leaves, paper, lampshades. Default 0. Deferred-path only for now.

    diffuseTransmissionColor?: [number, number, number]

    Tint of the transmitted diffuse (glTF diffuseTransmissionColorFactor). Default [1, 1, 1].

    subsurface?: number

    Subsurface scattering strength (engine shading model — no glTF extension): adds a view-dependent forward-scatter "glow" through thin backlit geometry (leaves, wax, skin, marble) plus a soft wrap on the lit side. Default 0 (off). Complements diffuseTransmission (which is the Lambertian back-gather). Deferred + forward + point/spot.

    subsurfaceColor?: [number, number, number]

    Tint of the subsurface-scattered light. Default [1, 1, 1]. Only meaningful when subsurface > 0.

    transmission?: number

    Refractive transmission strength (glTF KHR_materials_transmission transmissionFactor): the surface becomes see-through glass/amber, refracting the scene behind it by ior. Default 0 (opaque). Rendered by the forward TransmissionPass (not the deferred path).

    ior?: number

    Index of refraction used for refraction (glTF KHR_materials_ior). Also drives dielectric F0. Default 1.5.

    thickness?: number

    Volume thickness in world units (glTF KHR_materials_volume thicknessFactor): the distance light travels through the medium, driving Beer-Lambert absorption. 0 (default) = a thin surface (no volume).

    attenuationColor?: [number, number, number]

    Beer-Lambert absorption color (glTF attenuationColor). White (default) = no absorption tint.

    attenuationDistance?: number

    Distance over which attenuationColor fully absorbs (glTF attenuationDistance). Default Infinity (no absorption).

    dispersion?: number

    Chromatic dispersion strength (glTF KHR_materials_dispersion): spreads the IOR across R/G/B so transmitted light separates into prismatic color fringes (the rainbow edge in a gemstone or prism). Default 0 (no dispersion). Only meaningful when transmission > 0; rendered by the forward TransmissionPass.

    emissiveFactor?: [number, number, number]

    Linear-space RGB multiplier applied to emissiveMap samples. Defaults to [0, 0, 0] — i.e. emissive output is off unless either a map or a non-zero factor is set. For glTF, use the material's emissiveFactor directly.

    uvOffset?: [number, number]
    uvScale?: [number, number]
    uvTile?: [number, number]
    uvRotation?: number

    UV rotation in radians, applied between uvScale and uvOffset (matches glTF KHR_texture_transform). Default 0. Applies to every texture the material samples.

    alphaCutoff?: number

    MASK alpha-test threshold. When > 0, the deferred/opaque geometry pass discards fragments whose albedo alpha is below this value (glTF MASK alphaCutoff, default 0.5). 0 (the default) disables the test — used for OPAQUE and BLEND materials.

    pixelated?: boolean

    When true, the material's textures are sampled with nearest (point) filtering instead of the default linear — crisp, un-blurred texels for pixel-art / voxel atlases. Default false.

    normalScale?: number

    glTF normalTexture.scale — multiplies the sampled tangent-space normal XY before re-normalizing. Default 1.

    unlit?: boolean

    When true, the surface is shaded unlit (KHR_materials_unlit): final color is the base color with no lighting / IBL. Default false.

    anisotropyStrength?: number

    Anisotropy strength (glTF KHR_materials_anisotropy anisotropyStrength): stretches the specular highlight along the surface tangent — brushed metal, hair, satin. Range [0,1]; default 0 (isotropic). Deferred-path only for now (forward renders the base material isotropically).

    anisotropyRotation?: number

    Anisotropy direction angle in radians (glTF anisotropyRotation): rotates the highlight-stretch direction in tangent space. Default 0. Only meaningful when anisotropyStrength > 0.

    texCoordMask?: number

    Per-texture UV-set selector (glTF texCoord). A bitmask: bit set → that texture samples the mesh's second UV set (TEXCOORD_1) instead of UV0. Bits: albedo=1, normal=2, MER=4, emissive=8, ext=16, anisotropy=32. Default 0 (all textures use UV0). Only takes effect when the mesh supplies UV1 (the pass compiles the HAS_UV1 variant); inert otherwise. Set by GltfLoader from each textureInfo's texCoord. The single shared UV transform (uvOffset/uvScale/uvRotation) applies to whichever UV set a texture selects.

    texTransforms?: (PerTextureUvTransform | null)[]

    Per-texture UV transforms (glTF KHR_texture_transform applied independently per texture). An array of up to 6 entries in texCoordMask bit order — [albedo, normal, MER, emissive, ext, anisotropy] — each a PerTextureUvTransform (or null/omitted = identity for that slot). When set, the material compiles the HAS_TEX_TRANSFORM variant and binds a second group-2 uniform; each texture then uses its own offset/scale/rotation instead of the shared uvOffset/uvScale/uvRotation. The engine atlas uvTile still applies on top. Leave undefined for a single shared transform (the cheaper default path). Set by GltfLoader only when a model's textures carry genuinely differing transforms.

    albedoMap?: Texture
    normalMap?: Texture
    merMap?: Texture

    Packed metallic / emissive / roughness map (engine convention): R=metallic, G=emissive scalar (tinted by albedo), B=roughness. The block atlas uses this layout. glTF metallic-roughness textures are a different layout (B=metallic, G=roughness, R unused, no emission) — GltfLoader swizzles them into engine-MER on upload.

    emissiveMap?: Texture

    sRGB emission texture; multiplied by emissiveFactor.

    extMap?: Texture

    Packed per-pixel extension-scalar map (engine convention, built by GltfLoader): R=clearcoat intensity, G=clearcoat roughness, B=sheen roughness, A=iridescence intensity. Each channel multiplies the matching constant factor. A 1×1 white default (all factors pass through) stands in when absent. Sampled by the geometry pass (→ loc4 G-buffer) and the forward shaders.

    anisotropyMap?: Texture

    glTF KHR_materials_anisotropy anisotropyTexture: .rg = the anisotropy direction in tangent space (×2−1, rotated by anisotropyRotation), .b = a per-pixel strength multiplier for anisotropyStrength. A 1×1 default (rg=(1,0), b=1 → constant direction + full strength) stands in when absent. Sampled by the geometry pass (→ loc5 G-buffer) and by the forward / forward+ shaders (which decode it per pixel, matching deferred).

    transmissionMap?: Texture

    Per-pixel refractive transmission map (glTF transmissionTexture, .r multiplies transmission). Read by the forward TransmissionPass.

    thicknessMap?: Texture

    Per-pixel volume thickness map (glTF thicknessTexture, .g multiplies thickness). Read by the forward TransmissionPass.

    transparent?: boolean