Skip to content

DX12 with DirectComposition transparency not working #7108

@amrbashir

Description

@amrbashir

Description

Using DX12 backend to render into a DirectComposition Visual, alpha channel doesn't affect the render.

Repro steps

The repro can be found here, https://github.com/amrbashir/wgpu-dcomp-repro/blob/master/src/main.rs

It is adapted from a wgpu basic example and windows-rs DirectComposition example https://github.com/microsoft/windows-rs/blob/master/crates/samples/windows/dcomp/src/main.rs

Expected vs observed behavior

I expected to be able to create semi-transparent colors using DirectComposition + wpgu but instead, I only get Opaque composite alpha mode.

Extra materials

This is DirectComposition FillRectangle

Image

This is wgpu rendering to same visual, using the same color and alpha

Image

Platform
Information about your OS, version of wgpu, your tech stack, etc.
OS: Windows 11
wpgu: 24
wgpu-backend: DX12
windows-rs: 0.58

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: wsiIssues with swapchain management or windowingbackend: dx12Issues with DX12 or DXGItype: bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions