Luxar Viewer API Documentation - v2026.9.22
    Preparing search index...
    • Clamp a gamma value to a safe range and supply the canonical default of 1.0 when undefined.

      The shader computes pow(color, 1.0 / gamma), which divides by zero when gamma == 0. A lower bound of 0.001 matches what each material constructor was clamping inline before this helper existed; using one helper across all eight files (Point/Line/ GSplat/Mesh × GLSL/TSL) keeps the clamp identical if the bound ever changes.

      Parameters

      • gamma: number | undefined

      Returns number