Emulator Issues #12191
5.0-12078 Introduced Visual Glitches to Screen Space Effects when Anti-Alias Enabled
Star Fox Adventures
Game ID? (right click the game in the game list, Properties, Info tab)
MD5 Hash? (right click the game in the game list, Properties, Verify tab, Verify Integrity button)
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?
- Run Star Fox Adventures in version 5.0-12078 or later.
- 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?
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.)
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.
- 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.
#3 Updated by dwighthouse 3 months 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.
- 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.
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.