API

Function setAlphaToCoverage

  • Enable or disable alpha-to-coverage for one pipeline-owning target.

    Alpha-to-coverage is immutable WebGPU pipeline state, so call this before registerScene or before adding a text/sprite target to a scene. To change a material after registration, update the state and then call rebuildMaterial. This function does not change fragment alpha.

    Type Parameters

    Parameters

    • target: SupportedAlphaToCoverageTarget<T>

      Standard/PBR/Shader material, scene text, depth-hosted Sprite2D layer, or billboard system.

    • enabled: boolean

      Whether its eligible multisampled pipelines should convert fragment alpha to sample coverage.

    Returns void