hrydgard / ppsspp

A PSP emulator for Android, Windows, Mac and Linux, written in C++. Want to contribute? Join us on Discord at https://discord.gg/5NJB6dD or just send pull requests / issues. For discussion use the forums at forums.ppsspp.org.
https://www.ppsspp.org
Other
11.03k stars 2.15k forks source link

Midnight Club L.A. Remix sun flare goes through solid objects #18625

Open SixelAlexiS90 opened 8 months ago

SixelAlexiS90 commented 8 months ago

Game or games this happens in

ULES-01144 - Midnight Club L.A. Remix | ULUS-10383 - Midnight Club L.A. Remix

What area of the game

The sun flare goes through solid objects no metter the position or time of day, light in bright day or sunset. In this case I've took screenshots right after the garage in sunset time. I've tested it with all backend and it's the same, while it doesn't happen in "Software rendering".

Any Graphics backend (D11 in this case):

Screenshot (3470)

Software rendering:

Screenshot (3469)

What happens

The sun flare goes through solid objects.

Any Graphics backend (D11 in this case):

Screenshot (3470)

What should happen

The sun flare should be blocked by solid objects, like it's seen via the "Software rendering":

Screenshot (3469)

GE frame capture

ULES01144_lensflare2.zip

ULES01144000.zip

Platform

Windows

Mobile device model or graphics card (GPU)

NVIDIA GeForce RTX 2060

PPSSPP version affected

v1.16.6-688-g62019c9a9

Last working version

No response

Graphics backend (3D API)

Other

Checklist

hrydgard commented 8 months ago

Could you get a GE frame dump of exactly this position? See https://github.com/hrydgard/ppsspp/wiki/How-to-create-a-frame-dump

hrydgard commented 8 months ago

Additionally, this is another case of #15923 , adding it to the list.

SixelAlexiS90 commented 8 months ago

Could you get a GE frame dump of exactly this position? See https://github.com/hrydgard/ppsspp/wiki/How-to-create-a-frame-dump

Done, let me know if I didn't messed up :'D

hrydgard commented 8 months ago

Hm, that GE dump is only 1kb and empty, sometimes that happens depending on frame timing and so on. Try a couple more times, it should be at least a few hundred kb if valid...

hrydgard commented 8 months ago

Turns out that ca94de8d4b1e53b7d596d31e7336ac5133a32a7c broke frame dumps. Fix for that coming up, although it of course won't help the lens flare problem.

hrydgard commented 8 months ago

Both in software renderer and hardware renderer, the flare draw is performed. The only difference (except a marginal Z difference, not sure where that's coming from) seems to be vertex colors:

image

hardware:

image

The vertex data is coming from RAM so it seems the CPU is involved in detecting the coverage, or at least writing the result. So this might be one of the depth-buffer-peeking games, not confirmed yet though.

hrydgard commented 8 months ago

There's some strange stuff going on with the framedumps. the hw one doesn't fully render in software, it seems to stop halfway through, while it renders fine on hw.

Loading a savestate with the flare visible into software fades the lens flare out gradually.

SixelAlexiS90 commented 8 months ago

@hrydgard Hello and happy new year 💯 ! I've find out a similar issue about street lights as well. When you drive on high roads you will see all street lights through them, see here:

Screenshot (3498)

It doesn't happen in software mode (I've tested it on real hardware as well, it's the same):

Screenshot (3503)

Here a GE frame dump done in this spot:

ULES01144_0012.zip

And a save state as well:

MCLARemixEU - City lights through highway.zip

Btw these are the city light you see through the highway:

Screenshot (3508)

GE frame dump done in this spot:

ULES01144_0012.zip

A save state for this spot as well, maybe it will help:

MCLARemixEU - City lights on ground level.zip

Let me know if it's fine to leave all of this here or I need to modify the title/make a different report about it :)

hrydgard commented 8 months ago

Absolutely fine to leave it all here, it's very likely to be the same issue. Thanks!