@pmndrs/bvh
    Preparing search index...

    Variable MESH_HEADER_WORDConst

    MESH_HEADER_WORD: {
        materialTableDistance: 3;
        sideTableDistance: 1;
        sourceTableDistance: 2;
        vertexBase: 0;
    } = GPU_LAYOUT_MESH_HEADER_WORD

    The 16-byte header an indexed scene puts before each mesh's triangles (at triangleOffset - 1, in 16-byte units): the mesh's vertex base, and for a merged mesh how far back its side table and source table start.

    Type Declaration

    • ReadonlymaterialTableDistance: 3

      Other meshes with per-triangle materials: triangleOffset minus their material table's first vec4u (0: none). The table holds each original triangle's material code (material + 1, 0 for none) as 16 bits, two to a word, eight to a vec4u, by original index. A merged mesh keeps its materials in its side table instead.

    • ReadonlysideTableDistance: 1

      Merged meshes: triangleOffset minus the side table's first vec4u (0 otherwise).

    • ReadonlysourceTableDistance: 2

      Merged meshes: triangleOffset minus the source table's first vec4u (0 otherwise).

    • ReadonlyvertexBase: 0

      The mesh's first vertex in the scene's positions buffer.