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

    Module rendering/webgl-blend-warmup

    WebGL-only blend-variant program warm-up.

    Headless Chromium often runs WebGL through SwiftShader, whose shader/program link step is synchronous and can monopolize the main thread for seconds. Luxar's Layers panel lets users switch blending modes at runtime, and some mode transitions flip shader defines (max, volumetric, gsplat normal, mesh opaque cutout). Without a warm-up pass, the first click onto each variant pays that synchronous link cost on the interaction path.

    This manager pre-compiles every DISTINCT blend-variant program a live visual material can reach, one compile per post-frame idle opportunity so visible rendering and input get a turn before every link. Browsers without idle callbacks use a conservative 50 ms delay. The warmed programs stay pinned by keeper materials until the source material is replaced or disposed.

    The manager is configured only for classic THREE.WebGLRenderer; WebGPU/TSL sessions do not use it.

    WebGLBlendWarmupManager
    WarmupConfig
    WarmupTask
    TrackedObjectState
    SourceWarmupState
    BlendWarmupStats
    WarmCompletion
    WaitForWarmupTurn
    DeferActivation
    CompileOne
    buildBlendWarmupFingerprint
    configureBlendModeProgramWarmup
    scheduleBlendModeProgramWarmupForObject
    warmSceneBlendModePrograms
    clearBlendModeProgramWarmup
    getBlendModeProgramWarmupStats