Skip to content
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

Vulkan: Enabling MSAA with SSAO causes artifacts to appear on AMD Polaris GPUs #61415

Closed
ZeroTheOtaku opened this issue May 25, 2022 · 12 comments

Comments

@ZeroTheOtaku
Copy link

ZeroTheOtaku commented May 25, 2022

Godot version

4.0 Alpha 7

System information

Windows 10, Radeon RX560, GLES3/Vulkan

Issue description

MSAA Causing blocks to appear on screen when moving camera and in gameplay
Tried enabling SSAA and still have same problem.

image

The problem occurs when SSAO is enabled in the world environment and MSAA is enabled

image

Steps to reproduce

Set MSAA to 4x
Use a World Environment node
Enable SSAO
Move camera/view around till problem occurs (mainly happens when pointing on a top angle view onto objects)

Minimal reproduction project

MSAA Problem.zip

@Calinou Calinou changed the title MSAA with SSAO, Making Problem On Screen Vulkan: Enabling MSAA with SSAO causes artifacts to appear May 25, 2022
@Calinou Calinou added this to the 4.0 milestone May 25, 2022
@Calinou
Copy link
Member

Calinou commented May 25, 2022

4.0

Please specify the exact version you're using (i.e. which alpha or commit hash), as 4.0 stable isn't released yet.

@ZeroTheOtaku
Copy link
Author

Alpha 7

@SmartySmart702
Copy link

I tried it with Godot alpha 7 and 8 and I could not reproduce the bug.
Win 10, GTX 1070.

@Matzerath
Copy link

I can recreate this problem exactly, I am currently using Godot 4.0 beta 10, graphics card is a RadeonRX 580. With MSAA on at 4X, turning on SSAO causes artifacts when moving around, artifacts are gone when SSAO turned off. Problem shows up in an external Godot game I downloaded from Itch.io as well, 'Limspace'. Limspace does not have an option to turn SSAO on/off, I'm assuming that it is on.

@Calinou
Copy link
Member

Calinou commented Dec 24, 2022

I can't reproduce this on 4.0.beta f692b47 (Linux, AMD Radeon RX 6900 XT, Mesa RADV). This could be an issue specific to Polaris GPUs (and maybe also scoped to Windows).

image

Updated MRP to work with recent 4.0 betas: MSAA Problem2.zip

@TacoGuyAT
Copy link

TacoGuyAT commented May 23, 2023

Having the same issue here on Windows 10 with Polaris GPU. Tested on Godot 4.0, 4.0.2, 4.0.3-rc2 2ac4e3b and 4.0.3 5222a99 (with C# support for each of these).
image
image

MSAA 4x/8x and SSAO:

image

!!! Photosensitive warning !!!

unknown_2023.05.23-05.21.mp4

MSAA 4x/8x and SSIL:

image

MSAA 4x/8x and SDFGI:

image

MSAA 2x with SDFGI, SSAO and SSIL (simultaneously) looks somewhat normal:

image

Though, comparing to no AA, it causes some fuzzy borders:

image

Related issues: #76258 , #64144

(None of these problems are present when MSAA is disabled. Same glitches occur in the editor too.)

@TacoGuyAT
Copy link

TacoGuyAT commented May 23, 2023

I can't reproduce this on 4.0.beta f692b47 (Linux, AMD Radeon RX 6900 XT, Mesa RADV). This could be an issue specific to Polaris GPUs (and maybe also scoped to Windows).

image

Updated MRP to work with recent 4.0 betas: MSAA Problem2.zip

Able to reproduce the issue on this exact project, though, after importing and opening only FXAA was enabled. MSAA was turned off in it for some reason.

image
image

(System & engine info in the comment above)

@TacoGuyAT
Copy link

Fuzzy borders appear on GTX 1660 Ti GPU, but not SDFGI, SSIL and SSAO problems

MSAA 4x and SSAO:

image
image
image

image
image

(Engines are 4.0.3-rc2 2ac4e3b and 4.0.3 5222a99)

@Calinou Calinou changed the title Vulkan: Enabling MSAA with SSAO causes artifacts to appear Vulkan: Enabling MSAA with SSAO causes artifacts to appear on AMD Polaris GPUs May 23, 2023
@darksylinc
Copy link
Contributor

darksylinc commented Aug 27, 2023

This is a driver bug specific to AMD Polaris on Windows + MSAA.

SSAO is not the only effect that can trigger this. SDFGI can do it too. Many other effects, too.

The problem is that the Depth during the Depth Prepass does not match exactly the Depth during the forward pass; despite Godot asking for invariant gl_Position and using the exact code with the same data.

A workaround is to disable MSAA.

I will try to contact AMD to see if they can fix it.

Update

I was about to hit "Send" in the email when I noticed the artifacts were flashing.

I'm still researching it; but it looks like we are missing a lot of barriers pertaining MSAA's depth buffers.

@Calinou
Copy link
Member

Calinou commented Jan 13, 2024

@ZeroTheOtaku Can you test 4.3.dev2 to see if the issue is resolved there?

@Matzerath
Copy link

I have tested, and have so far not noticed any artifacts or other visual glitches after several builds, or in the main engine window for the project. I've tried this with all effects that previously caused this problem, plus MSAA x4. There may be more subtle side-effects, I was mostly looking for the very obvious artifacting that covered the entire screen, which seems to be fixed.

@Calinou
Copy link
Member

Calinou commented Jan 15, 2024

Thanks for checking 🙂 Closing then.

@Calinou Calinou closed this as completed Jan 15, 2024
@Calinou Calinou modified the milestones: 4.x, 4.3 Jan 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants