Skip to content

Metal: window-space layers are drawn with blending disabled (HUD overwrites its rect instead of compositing) #1788

Closed

Description

@dfattal

Summary

The Metal compositor's window-space pass (XrCompositionLayerWindowSpaceDXR) draws with projection_pipeline, which has blending disabled. A window-space HUD therefore overwrites its whole rectangle in the atlas instead of compositing over the 3D content. Transparent or antialiased HUD pixels replace what is under them, where they should blend.

Every other backend blends window-space layers and picks the factors from the layer flags: D3D11 and D3D12, Vulkan native (#1787) and GL (#1787). The rule is premultiplied when XRT_LAYER_COMPOSITION_BLEND_TEXTURE_SOURCE_ALPHA_BIT is clear and straight when it is set, with alpha composited "over" (ONE / ONE_MINUS_SRC_ALPHA).

Expected

The Metal window-space pass uses a blended pipeline (or premul/straight variants) chosen from the layer flags, matching D3D11. Found during the #1786 parity audit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions