flyinghead / flycast

Flycast is a multiplatform Sega Dreamcast, Naomi, Naomi 2 and Atomiswave emulator
GNU General Public License v2.0
1.5k stars 176 forks source link

World Series Baseball 2K1 - Graphical glitch in baserunner window #1027

Open kihato opened 1 year ago

kihato commented 1 year ago

Platform / OS / Hardware: Windows11 / i7-10700F / GTX 1660 SUPER

Github hash: 187674d

It seems that only the upper part of the window is not displayed. WSB2K1

flyinghead commented 1 year ago

The game punches holes in the depth buffer for the baserunner cams. Unfortunately this polygon has a negative depth, and is clipped during render preprocessing. Flycast is now no longer clipping negative depth vertices, which may have unintended consequences in other games depending on the GPU.

kihato commented 1 year ago

Confirmed. Thanks.

kihato commented 1 week ago

The wall color of the baserunner window appears to be pink, purple, etc., rather than the actual green. World Series Baseball 2K1.zip

WSB2K1_1

flyinghead commented 1 week ago

Interestingly I found another bug when investigating: the baserunners shadows aren't clipped when not using Per Pixel. So they overflow outside of the cam area. (Fixed on master).

Now for the wall color issue, I don't know how to fix it properly. I don't see any wall being drawn, so it might just be the magenta color that is incorrect, possibly due to some wrong texture coordinates. It's the same polygon that punches a hole in the depth buffer, and clears the cam background. I probably need to do some tests on real hardware.