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

    Function getCompleteBlendingState

    • Compute the complete blending state for a Luxar blending mode.

      opacity only affects depthWrite for normal mode (a fully-opaque normal layer should write depth so it occludes additive layers behind it). All other modes are opacity-independent.

      Parameters

      • mode: BlendingModeName

        One of 'normal', 'additive', 'max', 'opaque', 'luminous', 'volumetric'. See the file-level header for per-mode semantics.

      • opacity: number = 1.0

        Layer opacity in [0, 1]. Currently only consulted for mode === 'normal', where opacity >= 0.99 flips on depthWrite. Default 1.0.

      Returns CompleteBlendingState

      The complete THREE.js material state to apply (blending, blend factors, depth, transparency, and a shaderOutputMode hint for fragment shaders that need to know how to compose RGB).