Enable Windows body transparency via DirectComposition swapchain #123

Open
opened 2026-09-05 00:20:12 +09:00 by natsukium · 0 comments
Owner

Migrated from docs/backlog.md (Deferred / Windows body transparency).

Blocked on wgpu. window.opacity < 1.0 renders the body opaque on Windows because the DX12 backend's swapchain (CreateSwapChainForHwnd) advertises only the Opaque composite-alpha mode, so select_alpha_mode (pipeline.md "Window transparency and OS backdrops") falls back to opaque with a warning. A translucent body would need a DirectComposition-backed surface (CreateSwapChainForComposition + a DComp visual), which wgpu's window-handle surface path does not create. This does not affect the Windows window.backdrop materials, which style the OS title bar through DWM regardless, so title-bar glass works today; only the whole-window frost waits on this. Re-check when wgpu exposes a composition surface for HWND targets.

Blocked on wgpu exposing a DirectComposition surface for HWND (CreateSwapChainForComposition). Title-bar glass via DWM backdrop (window.backdrop) already works; only whole-window body translucency is blocked.

Revisit when wgpu adds a composition surface path for Windows.

Refs: docs/explanation/rendering/pipeline.md Window transparency and OS backdrops, crates/felis-render-wgpu select_alpha_mode.

Migrated from `docs/backlog.md` (Deferred / Windows body transparency). > Blocked on wgpu. `window.opacity < 1.0` renders the *body* opaque on Windows because the DX12 backend's swapchain (`CreateSwapChainForHwnd`) advertises only the `Opaque` composite-alpha mode, so `select_alpha_mode` ([pipeline.md](explanation/rendering/pipeline.md) "Window transparency and OS backdrops") falls back to opaque with a warning. A translucent body would need a DirectComposition-backed surface (`CreateSwapChainForComposition` + a `DComp` visual), which wgpu's window-handle surface path does not create. This does not affect the Windows `window.backdrop` materials, which style the OS title bar through DWM regardless, so title-bar glass works today; only the whole-window frost waits on this. Re-check when wgpu exposes a composition surface for HWND targets. Blocked on wgpu exposing a DirectComposition surface for HWND (`CreateSwapChainForComposition`). Title-bar glass via DWM backdrop (`window.backdrop`) already works; only whole-window body translucency is blocked. Revisit when wgpu adds a composition surface path for Windows. Refs: `docs/explanation/rendering/pipeline.md` Window transparency and OS backdrops, `crates/felis-render-wgpu` `select_alpha_mode`.
Sign in to join this conversation.
No description provided.