libretro / beetle-psx-libretro

Standalone port/fork of Mednafen PSX to the Libretro API.
GNU General Public License v2.0
309 stars 131 forks source link

PGXP causes some polygon edges appear black or white in THPS2 #576

Open nezumisama opened 4 years ago

nezumisama commented 4 years ago

Description

In b847cab, all other options default, enabling PGXP (setting to memory only or memory + CPU) causes white or black lines to appear that shouldn't in Tony Hawk's Pro Skater 2. Using wireframe mode, it becomes evident those lines are at polygon edges. This happens both with OpenGL and Vulkan. Setting higher internal resolution makes those lines finer. I'm guessing these artifacts could happen because PGXP moves verticies slightly causing gaps between polygons.

Expected behavior

Even with PGXP, no such white lines should be visible. b847cab-gl-default

Actual behavior

Here's how it looks with PGXP and internal resolution at 1x (note I have window size set at 4x and no shaders): b847cab-gl-pxgp And here's the same with 4x internal resolution: b847cab-gl-pxgp-4x

Here's the wireframe: wireframe Notice the white edge appears where there's an edge in the geometry between the green staircase's wall and the orange ground.

Steps to reproduce the bug

  1. Enable PGXP.
  2. Play Tony Hawk's Pro Skater 2. In the first level (hangar) the artifact is rearer and wieh it occurs, the lines are black. In the second level (school) it happens all over the place right from the starting position and the lines are white.

Bisect Results

I didn't do a bisect as I don't know of a version without this problem, but I tried a pretty old version that I wrongly remembered to work properly but it actually doesn't, this is 432feab. So unless this was fixed and broken along the way, then the problem exists at least since 432feab.

Version/Commit

Core options

beetle_psx_hw_pgxp_mode = "memory only"

Environment information

MateusAuri commented 2 years ago

This happens on several other games too. I can't recall exactly (it's been some time since I checked it), but I think either "MTV Sports: Skateboarding Featuring Andy Macdonald" and/or "MTV Sports: T.J. Lavin's Ultimate BMX" showcase a huge amount of this artifact, even on the player character model