godot
godot copied to clipboard
Forward+ Window transparency is not working, works in Compatibility renderer
Tested versions
Reproducible in 4.3 all dev snapshots, 4.2 and 4.1
System information
Godot v4.3.dev4 - Windows 10.0.19045 - Vulkan (Forward+) - dedicated AMD Radeon RX 6900 XT (Advanced Micro Devices, Inc.; 31.0.24002.92) - AMD Ryzen 9 7950X 16-Core Processor (32 Threads)
Issue description
Transparency does not work in the Forward+ renderer, at least on my system. It works fine in Compatibility renderer.
I set the correct parameters for transparency settings and I have used the same script on all the versions I tested: 4.3 all dev snapshots, 4.2 and 4.1
Project settings advanced enabled project>project settings>Display > Window > per pixel transparency> enabled project>project settings>Display > Window > transparent > enabled
Not sure if this an AMD issue.
Steps to reproduce
Enable Transparency settings in project settings:
Project settings advanced enabled project>project settings>Display > Window > per pixel transparency> enabled project>project settings>Display > Window > transparent > enabled
Create any type of node and add use a simple script to set the window and viewport to be transparent:
func _ready() -> void:
get_tree().get_root().set_transparent_background(true)
DisplayServer.window_set_flag(DisplayServer.WINDOW_FLAG_TRANSPARENT, true, 0)
The window should be transparent, if not, try switching to Compatibility renderer.
Minimal reproduction project (MRP)
This is also a problem for D3D12 in Forward+. I am running an Nvidia GPU so it isn't just AMD.
Create any type of node and add use a simple script to set the window and viewport to be transparent:
Not related to the bug itself, but you don't need the script if you have both project settings enabled already.
Doesn't work for me on Mobile, Compatibility, or Forward+, just shows a black screen. Using same setup as described in the issue GPU is a Radeon RX 7700S
Can confirm, same thing happening after updating NVIDIA drivers v 556.12. It corrects when reverting to previous versions.
Doesn't work for me on Mobile, Compatibility, or Forward+ for me, just shows a black screen. Using same setup as described in the issue GPU is a Radeon RX 7700S
Can you reproduce this on integrated graphics using the --gpu-index command line argument to choose a GPU on startup? If not, this is due to https://github.com/godotengine/godot/issues/76167.
Can you reproduce this on integrated graphics using the
--gpu-indexcommand line argument to choose a GPU on startup? If not, this is due to https://github.com/godotengine/godot/issues/76167.
Reproduces using integrated graphics on Forward+ Chip is an AMD Radeon 780M
I am also seeing this with an Nvidia 2080 Super. Windows 10. Drivers: 560.81. Godot 4.3.
Forward+ shows a black background rather than transparency. With the compatibility renderer transparency works just fine.
Forward+ transparency works fine on my M3 Mac.
Edit: Adjusting the "Vulkan/OpenGL present method" setting as described here allows Forward+ to work but that isn't really a viable thing to have every user do.
Same problem with NVIDIA 3070, Windows 10, Godot 4.3 and latest drivers.
Open OpenGL Triple Buffering in AMD Driver Setting, it doesn't work in Compatibility renderer(opengl3),but works in Compatibility renderer(opengl3_angle).
Forward+ render(vulkan,dx12) doesn't work.
According to the comments here, it may be amd's dxgi that causes the inability to use transparent window on vulkan.
I searched and found that AMD enables dxgi swapchain in vulkan by default and it can't be turned off by the user. DXGI Swapchain on Opengl and Vulkan Games
System info
AMD Driver version 24.5.1
Godot v4.3.stable - Windows 10.0.19045 - GLES3 (Compatibility) - AMD Radeon RX 7800 XT (Advanced Micro Devices, Inc.; 31.0.24033.1003) - 12th Gen Intel(R) Core(TM) i5-12400F (12 Threads)
Godot v4.3.stable - Windows 10.0.19045 - Vulkan (Forward+) - dedicated AMD Radeon RX 7800 XT (Advanced Micro Devices, Inc.; 31.0.24033.1003) - 12th Gen Intel(R) Core(TM) i5-12400F (12 Threads)
Hi folks, we seem to have isolated it to an NVIDIA graphics driver upgrade from version 546.33 to at least 546.33 with RTX cards on two systems:
System 1:
Doesn't work on:
Godot v4.3.stable - Windows 10.0.22631 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 4070 Ti (NVIDIA; 32.0.15.5585) - Intel(R) Core(TM) i7-14700KF (28 Threads)
However, switching to compatibility mode works:
Godot v4.3.stable - Windows 10.0.22631 - GLES3 (Compatibility) - NVIDIA GeForce RTX 4070 Ti (NVIDIA; 32.0.15.5585) - Intel(R) Core(TM) i7-14700KF (28 Threads)
System 2:
Works on NVIDIA 546.33:
Godot v4.3.stable - Windows 10.0.22631 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 4060 Ti (NVIDIA; 32.0.15.6109) - Intel(R) Core(TM) i7-10700KF CPU @ 3.80GHz (16 Threads)
After an upgrade to 561.03 it's broken. Again, switching to compatibility mode worked.
(Up to date AMD rig here) - Others' godot projects with transparent windows is broken. I cannot ask other creators to export in compatibility mode, and the comments on one suggested they already had. Transparency made with pygame and gamemaker is working fine. I cannot really pickup godot if this doesn't have a universal fix.
AMD driver 23.9.1 work for me,but 23.9.2 doesn't.
23.9.1 uses vulkan 2.0.270,
23.9.2 uses vulkan 2.0.283.
Data From Radeon™ Vulkan® Drivers Version Table and vulkaninfo --summary Command.
My other computer is an AMD integrated graphics card, and its vulkan support stopped at 2.0.297, but the transparent window worked fine. So I suspect there is a problem with the vulkan drive between 2.0.279 and 2.0.283
Another software also had a similar issue, his amd driver working at 23.8.1 and not working at 23.10.1
Transparency made with pygame and gamemaker is working fine.
@IFevre Maybe they use opengl.
I cannot ask other creators to export in compatibility mode, and the comments on one suggested they already had.
You can force a project to run with Compatibility by adding --rendering-method gl_compatibility to the launch options (e.g. right-click in Steam library > Properties). See Command line tutorial for a full list of options.
Same issue here. The solution listed by setting Vulkan/OpenGL Present mode to prefer native doesn't work for me and other users of my application. Won't work on NVIDIA 10 series. Not a single AMD dedicated graphics card work (Only integrated cards work) No idea about Intel integrated or dedicated graphics cards.
For me, turning off VSync in the project settings, and not using fullscreen or exclusive fullscreen fixed this! I can't believe the solution was so simple.
https://github.com/godotengine/godot/issues/65487 Didn't see this thread until now, so had posted here, but looks to be the same thing. Only single Nvidia gpu on my system. Will have to try rolling back the driver, but odd that it would have been an issue, resolved then broke again.
Yes, it was in fact related to the Nvidia GPU Vertical sync, If on Windows also make sure that within NVIDIA Control Panel that Manage 3D settings Vertical sync is set to "Use the 3D application setting" which is the default, or set to "off"
EDIT: I came back to my project today with the transparent background turning black again. I had not changed anything. I don't know if it has something to do with the driver, but toggling vsync in the project settings did nothing, changing Nvidia Vsync to off did nothing. I'm not sure if restarting the pc helped, but after that played with toggling some more and it magically worked again. turned vsync on in the project settings and it still worked as expected. So hard to tell what is the cause. Godot 4.4 dev 6 Nvidia driver version 560.94
Created as simple of a project as possible to help with testing here https://github.com/godotengine/godot/issues/65487 for anyone that wants to test and see what results they get.
Disabling v-synch helped me too, but for some reason if I move exported files into different folder, the background is black again.
Godot 4.5.1 OpenGL API 3.3.0 NVIDIA 581.57 - Compatibility - Using Device: NVIDIA - NVIDIA GeForce RTX 4050 Laptop GPU