Project

General

Profile

Actions

Emulator Issues #6040

closed

F-Zero GX Shadows (new information)

Added by MayImilae about 11 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
% Done:

0%

Operating system:
N/A
Issue type:
Bug
Milestone:
Regression:
No
Relates to usability:
No
Relates to performance:
No
Easy:
No
Relates to maintainability:
No
Regression start:
Fixed in:

Description

As everyone knows, F-Zero GX's (GFZE01) shadows show up scrambled when EFB to Texture is used, and can be fixed by turning on EFB to Ram (issue 5122). However the shadows can work in EFB to Texture. In fact, it can be perfectly controlled and is highly reproducible.

With EFB to Texture running, test it in practice mode. Pick any car, set it to 29 AIs, and go to any track. At the start of the race, all cars will have working shadows. Whenever a racer gets far enough off-screen that their shadow is culled by LOD, their shadow will glitch. So throughout the race, more and more shadows of AI cars will become glitched. The same rules apply to your car as well. If your shadow is off screen it will glitch out, either from running off the track (and get recovered) or if you stay in the first person view long enough (5-10) seconds.

Here's a video demonstrating how easy it is to do - http://www.youtube.com/watch?feature=player_detailpage&v=W7xhE1WiY_k

We don't know why the grand prix never has working shadows with EFB to Tex, but we have a theory. In practice mode, there is a small pause immediately before the race starts, presumably loading. In the Grand Prix, the loading pause is way earlier, as soon as you select a cup. Apparently the game loads as soon as it knows what track is selected. With Grand Prix, it's very early in the process. With Practice Mode, it's dead last, after car select and just before the race. Our guess is that Grand Prix is delayed enough that it causes the shadows cache or whatever to reset, or displaying the cars in the car select resets it.

Now, obviously, EFB to Ram fixes the shadow problem in all cases, and it has little impact on performance for this game. This isn't about trying to get more performance or anything. There is something wrong with EFB to Texture, and with this information this bug is a lot easier to understand and hopefully easier to fix. Fixing it here could fix other games, as well as put yet another game on the "awesome works by default" list.

Tested on 3.0 x64, 3.5-420 x64, 3.5-421 x64, and 3.5-426 x64. This is a long standing and well known issue, so didn't see the need to do tons of various revision testing. Everyone knows this has existed forever.

Tested by MaJoR and JMC4789 and reproduced by both, on two computers:

Core i5 3570K @ 4.7ghz
nVidia GTX275
Windows 7 x64

Core i5 720 @ 3.8ghz
nVidia GTX470
Windows 7 x64

Fifo player causes the glitch, Fifo logs cannot be used.

Actions #1

Updated by NeoBrainX about 11 years ago

Try commenting out lines 128 to 139 in http://code.google.com/p/dolphin-emu/source/browse/Source/Core/VideoCommon/Src/TextureCacheBase.cpp#128 ? (i.e. make the TCB::Cleanup() implementation empty)

Actions #2

Updated by JMC4789 about 11 years ago

That fixes it. Is there any way to do this that doesn't break other games?

Actions #3

Updated by NeoBrainX about 11 years ago

  • Status changed from New to Accepted

Yes. We could either just disable the cleanup stuff for efb copies in VRAM or we could force encoding the copies back to RAM while deleting them.

Actions #4

Updated by NeoBrainX about 11 years ago

  • Status changed from Accepted to Fixed

This issue was closed by revision 1141af64f64b.

Actions #5

Updated by MayImilae about 11 years ago

EFB to Texture works awesome in F-zero GX as of rd173d646de18. Maybe someone should alter the INI to allow EFB to Texture?

Actions #7

Updated by rachelbryk about 11 years ago

This issue was closed by revision 1141af64f64b.

Actions

Also available in: Atom PDF