Skip to content

Remove chroma-keying everywhere (clean slate) — ABI v4 #573

Description

@dfattal

Goal

Delete the chroma-key transparency mechanism everywhere — runtime, DP interfaces, sim_display, and the Leia plugin — for a clean slate. Chroma-key was the original crude fallback (magenta fill pre-weave → strip post-weave; disocclusion fringing, no partial alpha). True transparency (alpha-capable swapchain + transparent window/surface) is now the proven primary path on every shipped config, so the fallback is dead weight that also confuses coding agents (on D3D12/GL the set_chroma_key slot is overloaded as the transparency-enable signal).

Full plan lives in ~/.claude/plans/i-d-like-you-to-imperative-tome.md (local). Branch: chore/remove-chroma-key.

Decisions

  • Full clean slate, ABI-breaking (XRT_n_CURRENT 3→4), coordinated lockstep release: runtime + leia-plugin + sim_display. Extension XR_EXT_win32_window_binding SPEC_VERSION 7→8 (drops chromaKeyColor).
  • Close the gaps first, then delete — no config may regress to opaque.

Key facts

  • VK over IPC is already done via Android Android transparency: alpha-gated see-through for demo-avatar over the live screen #568 (service-presents-to-shared-Surface; VK set_transparent_background slot exists, chroma retired in e9b771f2b). VK excluded from gap-closing.
  • Metal needs no enable slot — the Metal compositor sets drawable clear-alpha itself, never calls the DP. Just delete its set_chroma_key slot.
  • Only D3D12 + GL need a new set_transparent_background slot added (D3D11 + VK already have it).

Residual gaps to close first (Windows-only)

  1. D3D12 / GL clients over IPC — service compositor is D3D11-only; client-owned transparent present (ADR-029) lived only in comp_d3d11_client.cpp. Generalize it (done in P0.1) and wire the other clients. Exotic configs (real transparent IPC apps are D3D11).
  2. GL / D3D in-process when WGL_NV_DX_interop2/WGC unavailable — no DComp-from-pure-GL path; add a glReadPixels→D3D11→DComp readback fallback. Near-extinct hardware.

Phases

  • P0 (additive, no ABI change): close the two gaps so nothing depends on chroma-key for see-through.
  • P1 (single ABI v4 bump): add set_transparent_background to D3D12+GL; delete set_chroma_key (all 5 DP interfaces), chroma_key_color (xrt_session_info + compositor create sigs + oxr_session_gfx_*_native.c), the svc_chroma_key_* pass (comp_d3d11_service.cpp), chromaKeyColor (extension), sim_display stubs, all leia-plugin ck_* code + shaders, test-app + docs refs. Leave the unrelated chromatic-aberration flag + image-codec "chroma" hits.

Progress

  • P0.1 done in code, pending Windows build — see next comment for the Windows verification + continuation handoff.

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