flyinghead / flycast

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

[PowerVR] Sonic Adventure 2 Flickering shadows/textures while in motion. #509

Open megarobohobo opened 2 years ago

megarobohobo commented 2 years ago

Platform / OS / Hardware: Retroid Pocket 2+ Android 9 OpenGL ES 3.2 build 1.10@5307123

Github hash: 8bb0bd05

Hardware: Unisoc Tiger T310 PowerVR GE8300

Description of the Issue

While in motion, shadows, posters, and some other textures flicker, looks like z-fighting.

Screenshot_20220117-183413 Screenshot_20220117-183425 Screenshot_20220117-183451

flyinghead commented 2 years ago

I can confirm this is a z-fighting issue, likely due to a loss of precision in the depth buffer with this GPU. It happens for many transparent polygons that are colplanar to opaque ones (wall posters, some shadows, ...)

I have tried several methods to mitigate the problem with some success but they also negatively impact other graphic elements and other scenes.