@pmndrs/bvh
    Preparing search index...

    Variable INSTANCE_FLAGConst

    INSTANCE_FLAG: { contributesToGi: 1; merged: 8; mirrored: 4; visible: 2 } = ...

    Instance flags bits 0-3. Bits 4-7 are reserved; bits 8-15 hold the instance mask (INSTANCE_MASK_SHIFT); bits 16-31 the instance's material (MATERIAL_SHIFT: material + 1, 0 for none). A merged record (INSTANCE_FLAG.merged) leaves them 0, and its triangles carry their source's material in triangle flags bits 16-31 instead.

    Type Declaration

    • ReadonlycontributesToGi: 1

      Rays that hit this instance count (an instance can be hidden from GI only).

    • Readonlymerged: 8

      A merged mesh of static instances (mergeStaticInstances, static-merge.ts): its triangles are in world space under an identity transform, and each names its source instance in the padding word (TRIANGLE_WORD_SOURCE_INSTANCE). The walk returns that index as the hit's instance instead of the record's instanceIndex.

    • Readonlymirrored: 4

      The object-to-world transform has a negative determinant (a mirror). Informational: the walk tests triangles in object space, where the winding is the authored one, so frontFace needs no flip (front faces follow the authored side, DECISIONS 2026-11-04).

    • Readonlyvisible: 2

      The instance is drawn at all.