@pmndrs/bvh
    Preparing search index...

    Function mergeStaticGeometry

    • Picks the instances that merge and produces each group's world-space geometry, as a normal mesh input for any builder, with the per-triangle source ids and flip bits kept beside it. Pure: nothing is built.

      Throws if a merged source's triangleFlags set a reserved bit (only bit 0 may be set), if two merged sources share an instanceIndex, or for a material outside 0-65534. Material doesn't split groups: each triangle carries its own source's.

      Static means static. The source transforms are baked into the geometry. Only assembling the scene again (assembleTraceScene with this plan) notices a source that moved, or whose mask, visible or contributesToGi changed: nothing checks between assemblies. A merged group's records must never be refit (GpuMeshRefit): they hold world-space corners and source-mesh triangle indices, so a refit from a source's object-space vertices would write wrong triangles.

      Parameters

      Returns StaticMergePlan