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

    Module rendering/materials/point/shader-tsl

    Point material TSL factory — NodeMaterial counterpart to the GLSL3 pair in shader-glsl.ts.

    Renders one soft super-Gaussian-falloff sprite per point with:

    • world-space sizing (perspective + orthographic)
    • sharpness -> super-Gaussian exponent beta mapping (beta = 2^(6s-2))
    • per-node Gain/Offset/Gamma colour adjustment
    • zero-radius nD-slicing discard

    The mesh layout is a 4-vertex unit-quad base plus one per-instance attribute:

    • aSortedIndex (uint) — draw-slot → storage-slot mapping (identity in Phase 1; the sort worker permutes it in Phase 2+) Per-point data comes from the RGBA32F point texture (uPointTex, 3 texels/point — layout in rendering/element-texture-layout.ts), fetched in the vertex stage via textureLoad. The vertex stage projects the fetched centre to clip space and expands the unit quad by the per-instance pointSize; the fragment stage discards outside the inscribed circle and computes the shifted-truncated super-Gaussian falloff.

    Feature toggles map to PointTSLConfig, mirroring the GLSL3 #define semantics where flipping a flag triggers a recompile:

    • useColormap → fetches the texel2.x scalar + samples uColormapTex instead of the texel1 color.
    • useMaxRGBContribution → premultiplies output RGB by alpha for the CustomBlending + MaxEquation rendering mode.
    PointTSLConfig
    PointTSLNodes
    pointWebGPUFactory
    buildPointTSLNodesFromUniforms