Taos API Reference
    Preparing search index...

    Interface ClusterInstance

    A clustered (meshlet) mesh instance drawn into the deferred G-buffer.

    interface ClusterInstance {
        mesh: ClusteredMesh;
        model: Mat4;
        albedo?: [number, number, number];
        roughness?: number;
        metallic?: number;
        colorMode?: number;
        lod?: boolean;
        lodThreshold?: number;
        castShadows?: boolean;
        terrain?: {
            textureArrayView: GPUTextureView;
            normalArrayView?: GPUTextureView;
            sampler: GPUSampler;
            heightScale: number;
            texScale: number;
        };
    }
    Index

    Properties

    model: Mat4

    World transform.

    albedo?: [number, number, number]

    Base albedo (linear RGB). Default mid-gray.

    roughness?: number
    metallic?: number
    colorMode?: number

    0 = flat material albedo (lit by the engine), 1 = per-meshlet debug coloring.

    lod?: boolean

    Enable continuous-LOD cut (requires a DAG mesh built via buildClusterDag).

    lodThreshold?: number

    Screen-space error threshold in pixels when lod is on (default 2).

    castShadows?: boolean

    Cast shadows into the directional cascaded shadow map (default true). Only active in mode:'cascade' shadows (the default); clipmap/VSM is a follow-up.

    terrain?: {
        textureArrayView: GPUTextureView;
        normalArrayView?: GPUTextureView;
        sampler: GPUSampler;
        heightScale: number;
        texScale: number;
    }

    Triplanar terrain texturing: a 4-layer albedo array (ground/rock/cliff/snow) blended by world height + slope. Replaces the flat albedo when set.

    Type Declaration

    • textureArrayView: GPUTextureView
    • OptionalnormalArrayView?: GPUTextureView

      4-layer tangent-space normal-map array (matching albedo layer order) for per-layer micro-relief. Optional — falls back to geometry normals if absent.

    • sampler: GPUSampler
    • heightScale: number

      World height that maps to the snow line.

    • texScale: number

      Triplanar texture tiling (world units → UV; e.g. 0.08).