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.19k stars 2.17k forks source link

NFS: Most Wanted: Graphics Dust, Smoke, Lights Glitches on last update. #15129

Closed patocius closed 2 years ago

patocius commented 2 years ago

Game or games this happens in

Tested in Most Wanted and Pulse

What area of the game

Usually happend on lights and smoke.

What happens

You can see a video of the issue in this link.

https://cdn.discordapp.com/attachments/869601237522337862/907711236660150272/VID_20211109_161923.mp4

What should happen

Lights and dust must showed properly like in other versions of ppsspp

GE frame capture

2021-11-11 19_03_49-beta-feedback - Discord

Platform

SDL2

Mobile phone model or graphics card

Anbernic 351P (351Elec)

PPSSPP version affected

v1.12.3-182+g4d3890547

Last working version

v1.11

Graphics backend (3D API)

OpenGL / GLES

Checklist

patocius commented 2 years ago

Another related issue is when you skip buffer effects the game got unplayable, gui and graphics glitch harder than in other versions of ppssspp.

ghost commented 2 years ago

Related https://github.com/hrydgard/ppsspp/issues/15056? This issue cannot reproduce in other graphic backend right?

dhwz commented 2 years ago

That's not the libretro version, that's the SDL2 version used in the screenshot.

patocius commented 2 years ago

Related #15056? This issue cannot reproduce in other graphic backend right?

I didnt test it in other graphic backend.

patocius commented 2 years ago

That's not the libretro version, that's the SDL2 version used in the screenshot.

Fixed the report and put it as SDL2 thx dhwz.

unknownbrackets commented 2 years ago

Please include a GE frame dump, which is like a 3D screenshot: https://github.com/hrydgard/ppsspp/wiki/How-to-create-a-frame-dump

You've instead attached a 2D screenshot. That's not very helpful.

Also, there are about 1800 different changes between the versions you posted. Without a GE frame dump, we're left guessing. If you could try a git build in between or try the stable version (v1.12.3), that would help at least narrow it down further.

-[Unknown]

patocius commented 2 years ago

Please include a GE frame dump, which is like a 3D screenshot: https://github.com/hrydgard/ppsspp/wiki/How-to-create-a-frame-dump

You've instead attached a 2D screenshot. That's not very helpful.

Also, there are about 1800 different changes between the versions you posted. Without a GE frame dump, we're left guessing. If you could try a git build in between or try the stable version (v1.12.3), that would help at least narrow it down further.

-[Unknown]

ok will try tomorrow thx.

Panderner commented 2 years ago

Here's a GE dump: DUMP.ppdmp.zip

Panderner commented 2 years ago

I can reproduce this issue for me: Screenshot_2021-11-12-16-44-13-509_org ppsspp ppsspp

hrydgard commented 2 years ago

@Panderner what's your device again? I'm having problems getting this to repro.

Just to confirm, you can repro directly by running the GE dump?

Panderner commented 2 years ago

@Panderner what's your device again? I'm having problems getting this to repro.

@hrydgard i'm using POCO M3

unknownbrackets commented 2 years ago

Based on the positions of the artifacts (which I also don't experience), it looks like maybe draw 398/462 (or maybe 397.)

This should be a texture from RAM that shows as a light spot. Maybe there's some interaction with creating framebuffers in RAM here or something? Not sure if that flag is on for these games.

Another interesting thing: a VRAM texture is set at level 1, but mipmapping is not enabled. I don't think we have a bug there in GL, though...

Anyway, the texture in question is only 32x32, so that's why I kinda suspect RAM framebuffers, the artifacting in the screenshot looks higher res than that, though it is set to wrap textures...

-[Unknown]

ghost commented 2 years ago

I cannot reproduce this on my phone 🤔

hrydgard commented 2 years ago

Bisected a bit. Weirdly, the HUD text changes color from white to black, as reported in #15212, in commit 5315c404c55778b48ab7dbf41295ed3904d0ce54 . Also, a lot of HUD stuff indeed breaks in that commit. Not sure if the smoke is related or not, having trouble getting a solid repro of that.

hrydgard commented 2 years ago

Unknown's related comment in Discord:

I added software transform culling but I didn't actually suppress the incorrect triangle culling that happens on the split triangles because it'd mean passing in prim as a uniform value and I hoped it wouldn't matter...

Wait, which split triangles? you mean splitting rectangles into triangles? And the depth part of it won't be that incorrect, right? These particular rectangles don't seem to be anywhere close getting culled at the sides....

Alternatively, instead of a uniform for prim, maybe we can squeeze a bit into the vertex attributes somewhere... Although a uniform is probably fine too.

hrydgard commented 2 years ago

To get the current master to behave exactly like the build prior to the commit that "broke" this, comment out the following two lines in SoftwareTransform.cpp, in the "else" case of if (!gstate.isDepthClampEnabled()) { in ExpandRectangles:

                if (tlz <= minZValue && brz <= minZValue)
                    continue;

So things get wrongly culled when depth clamp is enabled, and the two depths are below the minvalue. Here we haven't even reached the shader culling yet.

It's very weird to me how this change causes the effects we see, but there might be some offscreen processing step of font textures that break, or something.

hrydgard commented 2 years ago

Closing this as fixed after #15235, since correctly culling rects/triangles is not really something that should affect this once it's working.

Maarcis12 commented 2 years ago

thank you very much, that fixed it indeed.