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

    Variable GLSL_DENSITY_ALPHAConst

    GLSL_DENSITY_ALPHA: "\nuniform float uDensityAlphaExp;\nfloat luxarDensityAlpha(float a) {\n if (!(uDensityAlphaExp > 1.0)) return a;\n return 1.0 - pow(max(1.0 - a, 0.0), uDensityAlphaExp);\n}\n" = ...

    Fragment-stage companion of the density thinning above, for alpha-over (normal) nodes: the density guard drops a 1 − keep fraction of the elements and sets uDensityAlphaExp = 1/keep, so a survivor's alpha 1 − (1 − α)^(1/keep) makes keep·N survivors transmit what N did. At an exponent ≤ 1 — every unthinned node, and a material that never set the uniform (reads 0) — the helper returns a untouched, so such a node draws bit-identically. Sum-projected modes compensate through opacity instead (applyLodFade) and always carry the identity exponent.