Project

General

Profile

Actions

Emulator Issues #12191

closed

5.0-12078 Introduced Visual Glitches to Screen Space Effects when Anti-Alias Enabled

Added by dwighthouse almost 4 years ago. Updated over 3 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
% Done:

0%

Operating system:
N/A
Issue type:
Bug
Milestone:
Current
Regression:
Yes
Relates to usability:
No
Relates to performance:
No
Easy:
No
Relates to maintainability:
No
Regression start:
5.0-12078
Fixed in:
5.0-12699

Description

Game Name?

Star Fox Adventures

Game ID? (right click the game in the game list, Properties, Info tab)

GSAE01

MD5 Hash? (right click the game in the game list, Properties, Verify tab, Verify Integrity button)

afb0306454b581e37a62170fdfd1de09

What's the problem? Describe what went wrong.

Something in the 5.0-12078 code change drastically damaged the rendering of Star Fox Adventures' screen-space blur effects if any kind of Anti-Aliasing is enabled at all. It appears that the generated map for determining where a particular kind of screen space blurring effect should occur are either mis-aligned or missing when Anti-Aliasing is enabled. The result is that many cutscenes and all fighting sequences are now blurry or glitched.

What steps will reproduce the problem?

  1. Run Star Fox Adventures in version 5.0-12078 or later.
  2. View first cutscene or enter a fight with an enemy.

Is the issue present in the latest development version? For future reference, please also write down the version number of the latest development version.

It is in the latest version (5.0-12320). I bisected versions until I found the change:

  • dolphin-master-5.0-12076-x64 - no bug
  • dolphin-master-5.0-12078-x64 - bug (FIRST APPEARANCE)

Here is the relevant PR that probably contains the change that caused this glitch: https://github.com/dolphin-emu/dolphin/pull/8827

Is the issue present in the latest stable version?

Yes

If the issue isn't present in the latest stable version, which is the first broken version? (You can find the first broken version by bisecting. Windows users can use the tool https://forums.dolphin-emu.org/Thread-green-notice-development-thread-unofficial-dolphin-bisection-tool-for-finding-broken-builds and anyone who is building Dolphin on their own can use git bisect.)

5.0-12078

If your issue is a graphical issue, please attach screenshots and record a three frame fifolog of the issue if possible. Screenshots showing what it is supposed to look like from either console or older builds of Dolphin will help too. For more information on how to use the fifoplayer, please check here: https://wiki.dolphin-emu.org/index.php?title=FifoPlayer

See attached screenshots.

What are your PC specifications? (CPU, GPU, Operating System, more)

AMD Ryzen 7 3700X 3.59Ghz
32 GB RAM
High Speed NVMe Drive
ASUS GeForce GTX 1080 STRIX 8GB
Windows 10 Pro

Is there anything else that can help developers narrow down the issue? (e.g. logs, screenshots,
configuration files, savefiles, savestates)

If you look closely at the pictures, such as 5.0-12076_NoBug, you'll see that at the back tip of the staff, it is blurred. This is correct. The blur effect starts taking place at that distance from the camera in that scene. This shows that the blur effect is active, but not blurring everything out, as it does in some of the image examples of the glitches.

I checked most other settings and was unable to find anything besides Anti-Alias settings that appeared to affect this issue.

Here are the specific things that happen with various settings and backends:

For version 5.0-12078 in both Vulkan and DirectX12:

  • No visual glitches if Anti-Alias set to None
  • For MSAA 2x and 4x, and SSAA 2x and 4x, visual glitches appear in a series of lines of blur effect, and in the wrong place.
  • For MSAA 8x and SSAA 8x, the mask is in the wrong place or missing, but at least it is not broken up into pieces.

For version 5.0-12078 in OpenGL:

  • No visual glitches if Anti-Alias set to None
  • All other modes of MSAA or SSAA result in the screen-space rain effect disappearing entirely.

For version 5.0-12076, for all backends:

  • No visual glitches for any Anti-Alias setting.

Files

5.0-12076_NoBug.jpg (1.08 MB) 5.0-12076_NoBug.jpg The rendering is correct in this image. Notice how only the tip of the wings and staff are blurry. dwighthouse, 07/19/2020 09:55 PM
5.0-12076_SSAA2.jpg (1.08 MB) 5.0-12076_SSAA2.jpg Even with SSAA 2x rendering, in 5.0-12076 there are no visual glitches. dwighthouse, 07/19/2020 09:55 PM
5.0-12078_Bug.jpg (1.14 MB) 5.0-12078_Bug.jpg Starting in version 5.0-12078, the blur effect (which in this case also contains the rain background) appears in front of the main character, blurring everything. dwighthouse, 07/19/2020 09:55 PM
5.0-12078_SSAA2.jpg (1.11 MB) 5.0-12078_SSAA2.jpg At 2x and 4x SSAA and MSAA, the blur effect's mask is in the wrong place and broken up into lines. dwighthouse, 07/19/2020 09:55 PM
ActualGamecubeComparison2.jpg (1.56 MB) ActualGamecubeComparison2.jpg dwighthouse, 09/11/2020 07:25 PM
Actions #1

Updated by JosJuice almost 4 years ago

  • Milestone set to Current
  • Regression changed from No to Yes
  • Regression start set to 5.0-12078
Actions #2

Updated by JMC4789 over 3 years ago

  • Assignee set to Stenzek

Unless I'm missing something, I'm not 100% sure this is our fault. This change should only affect things when the driver is broken/falling back, and if it was working before, it may have been because the blur effects weren't being detected at all due to the broken format.

Asking Stenzek for clarification but I'm not so sure this is something we can do anything about. MSAA/SSAA are known to break EFB effects and if for some reason an invalid pixel format was allowing some EFB effects to be somehow skipped, I don't think that's a particularly good thing anyway.

Actions #3

Updated by dwighthouse over 3 years ago

Adding an additional file to clarify that the behavior seen in 12076 matches that of actual GameCube hardware. I can't comment on how well MSAA is able to work with EFB effects, but it is clear that if this issue is not somehow addressed, then Star Fox Adventures may become unplayably blurry if any anti-aliasing is active.

Actions #4

Updated by JMC4789 over 3 years ago

  • Status changed from New to Questionable

I'm not saying it's about MSAA being accurate or anything. What I'm saying is that there was a bug before that caused certain MSAA settings to cause the driver to skip certain EFB access effects. Stenzek fixed that bug so now those effects aren't skipped, which is why I think this is weird. MSAA is notably buggy with all kinds of EFB effects so the fact it was skipping something due to another bug is completely within reason.

Actions #5

Updated by dwighthouse over 3 years ago

Understandable.

Actions #6

Updated by JMC4789 over 3 years ago

I would really like a GPU emulation expert to chime in. Until we have someone available to give a definitive answer, I'm going to leave this open.

In the past, when possible, there have been ways to avoid MSAA breaking things we don't want it to touch. There may be a way to do this without the glitch we had before.

Actions #7

Updated by Miksel12 over 3 years ago

Actions #8

Updated by JosJuice over 3 years ago

  • Status changed from Questionable to Fixed
  • Fixed in set to 5.0-12699
Actions

Also available in: Atom PDF