godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
90.82k stars 21.14k forks source link

"Transparent" flag doesnt make the window transparent #74304

Open ababen1 opened 1 year ago

ababen1 commented 1 year ago

Godot version

v4.0.stable.official [92bee43ad]

System information

windows 10

Issue description

the transparent flag doesn't make the window have transperant background image

Steps to reproduce

add a window node and turn on "transparent"

Minimal reproduction project

project.zip

KoBeWi commented 1 year ago

You also need to enable transparent_bg under Viewport.

ababen1 commented 1 year ago

oh ok I see, thanks what does "transpernt" do then? how is it different then transparent_bg?

Sauermann commented 1 year ago

On Linux X11 Xfce, the combination Window.transparent == true + Viewport.transparent_bg == true + Project setting embed_subwindows == false leads to windows that are not transparent. Not sure if this is a X11-limitation or a Godot bug.

KoBeWi commented 1 year ago

Likely a limitation, see the description of transparent.

akien-mga commented 1 year ago

CC @bruvzg

bruvzg commented 1 year ago

Seems to be working fine with both embedded and native windows. But window should be borderless and Transparent BG should be enabled in the window Viewport properties, also for the native windows Allow per-pixel transparancy should be enabled in the project settings.

Sauermann commented 1 year ago

On Windows 10, I have tested the following combination:

Project Settings:

For a native non-Main-Window:

The created secondary native window doesn't have a transparent background.

With project setting embed_subwindows == true, the secondary window has a transparent background.

MRP: GodotPlaygroundWindow.zip