godot
godot copied to clipboard
Vulkan: Screen-space effects (SSAO, SSIL, SSR) sometimes break when the viewport is resized
Godot version
4.0 dev beta 3
System information
Windows 10, AMD Radeon RX6800XT
Issue description
On Windows my game shows a bunch of horizontal stripes across the screen:
This isn't present on Arch Linux KDE X11 with Mesa drivers on the exact same hardware:
The issue seems to be related to changing window (viewport) dimensions. Disabling fullscreen in the game seems to help:
- Hit
~
key to open in-game console - Type
display_fullscreen false
- Type
quit
and restart the game
Steps to reproduce
- Clone Liblast's repo: https://codeberg.org/Liblast/Liblast
- Don't forget
lfs install && lfs pull
or you'll have no assets - Run the game
Minimal reproduction project
No response
It seems that screen-space effects are affected by this.
- Look at the green face screen-space reflection that's incorrectly cast on the floor surface
- The background scene is supposed to be blurred out with bokeh, but it seems that effect sis broken as well.
- Glow also seems to be affected by the stripes
- Bokeh however is rendered correctly where the backdrop of the scene is the sky, and not any geometry.
Resizing the window will break SSAO/SSIL/SSR in my experience, on any OS and graphics card model. This does not always occur, and resizing the window again can sometimes fix the issue. Resizing the window by dragging the handles may also behave differently compared to maximizing/restoring the window, as dragging the handles causes continuous resizing instead of resizing just once.
Is this still broken? I fixed a bunch of bugs around SSAO/SSIL/SSR detecting changes in buffer sizes awhile back.
I can't reproduce this issue with SSAO anymore as of 4.0.beta7 (Linux, AMD Radeon RX 6900 XT with RADV):
Half Size disabled
https://user-images.githubusercontent.com/180032/205954430-2d3b87de-5ec4-475b-b728-336df97a138b.mp4
Half Size Enabled
See https://github.com/godotengine/godot/issues/62881.
https://user-images.githubusercontent.com/180032/205954460-cc6d5fc2-09f0-4836-b2d7-58b7e495ec52.mp4
Minimal reproduction project: test_ssao_resize.zip
I'll have to test it. It only happened on Windows 10, never on Linux, despite running on the exact same hardware.
I can confirm that SSIL breaks on Win 10 with a Radeon 6900XT running the latest drivers.
Steps to reproduce:
- Open a scene with SSIL enabled (e.g. https://github.com/Rytelier/Godot-4-forest-benchmark)
- Move the camera so that some geometry goes beyond the bottom border.
- Behold, artifacts!
Example image
Resizing the viewport fixes and/or causes this problem. My guess is that there are problems with the buffer size, but I haven't looked deeper into it yet.
Related: https://github.com/godotengine/godot/issues/62881 and https://github.com/godotengine/godot/issues/65987
Should be fixed with #72838
Small footnote that with fixing SSR there seems to be a new issue where high roughness causes small reflections to blur into star shapes. We'll investigate that with a separate issue (if we don't figure this out today).
I can still reproduce this on Windows in v4.1.2.stable.official [399c9dc39] using AMD Radeon RX6800XT GPU. Same hardware on Linux doesn't have this issue.
This here is a transparent mesh using a visual shader:
And here it's on a transparent mesh (colorful trail) and on volumetric fog (partially?):
Happens for SSR as well:
@unfa Do you use any level of MSAA? See https://github.com/godotengine/godot/issues/61415.