-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bevy Transparent Window not working #10929
Comments
What OS are you on? Can you reproduce this on |
Looks like this is the issue from winit: rust-windowing/winit#2960 |
rust-windowing/winit#2960 shouldn't affect us. It only affects winit's own examples Can confirm transparency is broken on main with Windows 10. I remember it working at some point. |
Appears to be an issue with wgpu not correctly detecting surface capabilities. SurfaceCapabilities::alpha_modes only contains |
transparent windows work on main on macos |
Broken on Wayland as well, but working on X11 natively and via XWayland. |
This discussion #9696 (comment) points to this PR rust-windowing/winit#2895 and searching that repo for open PRs on transparency leads to this open PR rust-windowing/winit#2503 which attempts to fix the winit transparency example but it just makes everything transparent not just the background There's also this issue gfx-rs/wgpu#3486 which may be relevant |
I had this problem on XFCE and I was debugging it within winit since their example didn't work for me either. Turns out my problem was very simple... I had disabled my compositor. |
I'm facing a similar issue running this example and getting window transparency on linux as well. I've tried x11, wayland, and I tried switching from gnome to KDE, and I still can't get transparency to work. minimizing transparency to just: app
.add_plugins(DefaultPlugins
.set(
WindowPlugin {
primary_window: Some(
Window {
transparent: true,
composite_alpha_mode: bevy::window::CompositeAlphaMode::PostMultiplied,
..default()
}
),
..default()
}
) causes an error:
I've also tried setting the backend target to vulkan, and the issue still persists. |
@rydb Purely by trial and error, I discovered that (on Wayland at least) setting mode to |
the problem I have is that is not selectable either. its Opaque only on my end. |
I got the same bug for windows 10 64bit. The first window fail to do transparent. Second window works. Just trying see what wrong. I did look at the youtube video example that was months ago. https://www.youtube.com/watch?v=Sljhkwu3WDo 0.13.2
I wonder how DefaultPlugins and entity commands.spawn window any different setup? |
The following text was generated by automatic translation.
unfortunately, my computer other backend cannot succeed, because only support CompositeAlphaMode: : Opaque mode. |
Previously windows platform transparent window worked, probably because the driver did not support DXGI Swapchain by default. |
Wayland only supports pre-multiplied alpha. Behavior on X11 seems unchanged. # Objective - Fix #10929 on wayland. ## Solution - Request pre-multiplied alpha. ## Testing - Ran the example locally.
Hrm, I'll check on Wayland again with 0.15.0-dev in case there's a regression, I know it's working on Linux in 0.14.2 so may be "a Windows thing"... |
Still working on XWayland with an AMD card. NVIDIA kind of dies a horrible death, but I don't think that's terribly unexpected:
I'll look into Windows behaviour, I still have a Windows laptop floating around. Will open a PR if I can see an obvious remedy. |
Potentially helpful reference is glutin whose |
You should look at CompositeAlphaMode |
Bevy version
0.12.1
What you did
Running the "transparent_window" example.
What went wrong
Window is not transparent.
Additional information
The text was updated successfully, but these errors were encountered: