Metroid Prime 2: Echoes (GC): Difference between revisions

Copying over shader compilation stuttering and black bar changes from Metroid Prime 3: Corruption (Wii). Also readded visor notice and efb to texture config (it still needs to be there even if default! we have to keep a record)
(Copying over shader compilation stuttering and black bar changes from Metroid Prime 3: Corruption (Wii). Also readded visor notice and efb to texture config (it still needs to be there even if default! we have to keep a record))
Line 27: Line 27:
== Problems ==
== Problems ==


=== {{s}}Shader Generation Stuttering and the Black Bar{{/s}} ===
=== Shader Compilation Stuttering ===
This game suffers from severe stuttering during shader generation. Because of the differences between how the GameCube works compared to personal computers, whenever something uses the GameCube's GPU, Dolphin must generate a shader to emulate it on a PC GPU. Shader generation causes a slight emulation delay while it's being created, so Dolphin caches these shaders in its shadercache folder to help keep things smooth. Most games don't care about this and play fine, but with this game, the shaders are so massive that they cause a significant delay, which creates a hard stutter and desyncs the GPU and CPU threads. The game freaks out over this desync, creating a black bar at the bottom of the screen, which takes up 15% of the screen space and "squishes" the game in the remaining space. The black bar will remain there from then on whether stuttering continues or ceases. Going into new areas or showing new effects will cause the stutter and black bar, as well as going in and out of fullscreen and even taking a screenshot. Building up a shadercache of an area helps, but it will still stutter and desync if a new effect or region is loaded.
The ''Metroid Prime'' games are some of the most susceptible titles to shader compilation stuttering, thanks to a combination of very complex effects and dynamic loading. The GC and Wii have no concept of shaders - everything runs directly "on the metal" without any APIs. Modern desktop and phone systems do not work in this way, requiring the use of shaders as an intermediary so your system's GPU can perform the tasks that the GC and Wii GPU performed. But shaders have to be created, and since GC/Wii games are not designed to create shaders ahead of time as a PC game would, when a new effect appears Dolphin has to delay the CPU thread while the GPU thread performs the compilation; a pause that does not exist on the consoles. For most games shader generation takes only a few milliseconds, but for the ''Metroid Prime'' series and a few other demanding titles, the shaders that they generate are so large that they can result in noticeable stuttering.
 
Eventually stuttering will reduce as a shader cache is built up, but there is no solution to this problem at this time.


Playing with Dual Core disabled or using Sync GPU Thread fix the issue, but both result in a significant performance hit. See {{issue|4336}} and {{issue|5185}}. Fixed by {{revision|4.0-7517}}.
{{image|MP2GC NoSquish.jpg|NTSC Correct emulation}}
{{image|MP2GC NoSquish.jpg|NTSC Correct emulation}}
{{image|MP2GC Squish.jpg|NTSC Black bar and squishing|br}}
{{image|MP2GC Squish.jpg|NTSC Black bar and squishing|br}}
=== Visors ===
Visors will only work if '''Store EFB Copies to Texture Only''' is disabled. Though '''Store EFB Copies to Texture Only''' is forced off by the GameINI, visor corruption may still occur if the graphics configuration window is opened during gameplay. Disable '''Store EFB Copies to Texture Only''' in the Dolphin GUI to avoid any problems.


=== Dot ===
=== Dot ===
When playing above 1x Native internal resolution, there is a dot in the center of the screen. It's small and easy to ignore, but it is present whenever the HUD is on screen. There is no fix for this problem.
When playing above 1x Native internal resolution, there is a dot in the center of the screen. It's small and easy to ignore, but it is present whenever the HUD is on screen. There is no fix for this problem.
{{image|MP2GC Thedot zoom.png|The dot, zoomed in 8x|br}}
{{image|MP2GC Thedot zoom.png|The dot, zoomed in 8x|br}}
=== The Black Bar ===
During Shader Compilation, stuttering can become so severe that it desyncs the GPU and CPU threads in Dual Core mode. The game freaks out over this desync, creating a black bar at the bottom of the screen, which takes up 15% of the screen space and "squishes" the game in the remaining space. The black bar will remain there from then on whether stuttering continues or ceases.
After {{revision|4.0-7517}}, enabling Virtual XFB or Real XFB will fix and/or prevent the problem. If XFB is disabled the problem may still occur. Details can be found in the [https://dolphin-emu.org/blog/2015/10/01/dolphin-progress-report-september-2015/#40-7517-derive-field-timings-from-video-interface-registers-by-booto September Progress Report].


=== {{s}}Refraction Slowdown{{/s}} ===
=== {{s}}Refraction Slowdown{{/s}} ===
Line 44: Line 53:
<!--A full list of options is available at Template:Config/doc-->
<!--A full list of options is available at Template:Config/doc-->
{{Config
{{Config
|efb2texonly = Off
|efb2texonlynotes = Needed to avoid visor issues
|xfb = Virtual
|xfbnotes = Fixes the black bar
}}
}}