Luxar Viewer API Documentation - v2026.9.22
    Preparing search index...

    Module rendering/gsplat-geometry

    GSplat Geometry Creation for Luxar

    Creates and updates instanced quad geometry for Gaussian splat rendering. Per-splat data lives in an RGBA32F splat texture (4 texels/splat — see ./element-texture-layout for the layout authority) sampled by the vertex shader via texelFetch; the only per-instance attribute is aSortedIndex (Uint32), which maps the draw slot to a storage slot so draw order can be permuted without rewriting splat data (depth-sorting plan §4). Phase 1 writes identity ordering; the sort worker (Phase 2+) rewrites it.

    Texture lifetime = geometry lifetime: attachSplatStorage registers a dispose listener on the geometry, so every dispose site (pool evictors, pool.dispose(), the fallback rebuild swap) frees the texture with the geometry — no site-by-site bookkeeping.

    The geometry-agnostic storage helpers (texture+aSortedIndex attachment, dirty-range registration, ordering writers) live in ./element-storage, shared with the points migration; this module keeps the gsplat-specific texel layout, quad creation, and the non-pool mesh fallback, plus thin gsplat-bound wrappers (attachSplatStorage/getSplatTexture) so gsplat call sites stay small.

    InstancedGSplatsMeshConfig
    SplatTexelSource
    createGSplatQuadGeometry
    attachSplatStorage
    getSplatTexture
    writeSplatTexels
    computeMaxCholeskyRowNorm
    createInstancedGSplatsMesh
    updateInstancedGSplatsMesh
    stampGSplatPresenceFlags