ppsspp icon indicating copy to clipboard operation
ppsspp copied to clipboard

Syphon Filter Dark Mirror - lights are visible through buildings

Open Leopard20 opened this issue 7 years ago • 15 comments

What happens? You can see the sources of lights through buildings (e.g lamps, ground reflections, etc) It's a minor issue and the game's perfectly playable. I was just wondering if you could improve it.

What should happen? I'm not sure if the game's meant to be like this or not because I don't own an actual PSP. But I think it shouldn't be like this.

What hardware and operating system are you running PPSSPP on? GPU might matter if it's a graphical issue. Android 7.0 GPU: Adreno 530 PPSSPP Build: 1.5.3

Leopard20 avatar Dec 02 '17 16:12 Leopard20

Does this happen in both Vulkan and OpenGL? Does it also happen on a PC?

My guess is this is related to dual src alpha, but not sure. I think there's a similar bug in another game which isn't, and might be depth related.

-[Unknown]

unknownbrackets avatar Dec 02 '17 16:12 unknownbrackets

Yes it happens on both backends. I don't have the PC version installed. I'll install it and report later.

Leopard20 avatar Dec 02 '17 18:12 Leopard20

Update: The issue also happens on the PC version, regardless of backend: scr

Leopard20 avatar Dec 04 '17 14:12 Leopard20

Most likely the game is peeking at the depth buffer with the CPU to check whether to draw the flares, which is something we can't easily support (though in Vulkan now, we totally could have asynchronous download of the depth buffer every frame without too much slowdown, possibly... but probably wouldn't want that enabled for all games)

hrydgard avatar Dec 04 '17 14:12 hrydgard

Sorry, this is the one I meant to suggest a GE debugger dump on. Commented on the wrong issue like a dope.

But yeah, could be the depth buffer... I think I had a temp branch which downloaded that on desktop GL, although it was buggy...

-[Unknown]

unknownbrackets avatar Dec 04 '17 14:12 unknownbrackets

Oh. Well in that case, here it is: UCUS98641_0001.zip

Leopard20 avatar Dec 04 '17 14:12 Leopard20

the same as #6105

benderscruffy01 avatar Mar 24 '19 08:03 benderscruffy01

Certainly a similar outcome, but I don't think these games work the same.

hrydgard avatar Mar 24 '19 10:03 hrydgard

The lights are drawn at 4880/4946, with the only useful test being a >= depth test. But the specified depth is 1, so I'm not sure why it wouldn't draw... it also shows these lights in the software renderer.

The dump also shows the same on a real PSP: UCUS98641_#10229_syphon_lights

A fresh dump (there have been improvements) might help, but it could be that some CPU work is uploading depth? The dump won't catch this. I don't think it's the same exact cause as the other indeed.

-[Unknown]

unknownbrackets avatar Mar 24 '19 15:03 unknownbrackets

Also affects Resistance.

ghost avatar Nov 02 '20 11:11 ghost

don't know if it's worth mentioning or not so i'll post it here anyways.

someone did a texture pack on the forums for both games and one thing i noticed in the screenshots is when they have their texture pack nabled the lights don't show through the buildings

https://forums.ppsspp.org/showthread.php?tid=28201&pid=142926#pid142926

oldmario avatar Nov 14 '21 19:11 oldmario

Didn't checked, but it's probably just using empty textures to get rid of those lights, you can see the screenshots with texture replacement active which have much darker light sources. Nothing related to the issue, just a partial workaround at the cost of darker game.

LunaMoo avatar Nov 15 '21 23:11 LunaMoo

I made this pack and that's what I did, the lens-flare effect is just fully transparent.

Kayael76 avatar Mar 31 '22 17:03 Kayael76

How about this now? https://github.com/hrydgard/ppsspp/pull/15772 or https://github.com/hrydgard/ppsspp/pull/15700 might help this.

ghost avatar Aug 02 '22 23:08 ghost

Using the ge dump issue can still reproduce. Both hardware and software Screenshot_2022-08-03-08-56-29-605_org ppsspp ppsspp

ghost avatar Aug 03 '22 00:08 ghost

Syphon Filter Logan's Shadow have the same lens flare (through the walls) problem

Screenshot_2022-08-30-22-45-49-643_org.ppsspp.ppsspp.jpg

QrTa avatar Aug 30 '22 20:08 QrTa

Most likely the game is peeking at the depth buffer with the CPU to check whether to draw the flares, which is something we can't easily support (though in Vulkan now, we totally could have asynchronous download of the depth buffer every frame without too much slowdown, possibly... but probably wouldn't want that enabled for all games)

changing skip draw range to 1:3 solves this same issue in syphon filter on PCSX2, sadly PPSSPP doesn't have skip draw range

LeyoSFO avatar Nov 29 '22 13:11 LeyoSFO

Light/flare occlusion is indeed done by the CPU peeking directly in the depth buffer, and it does work 100% correctly in the software renderer, possibly not from a framedump though?

#16907 fixes it for hardware rendering at the cost of an expensive readback.

hrydgard avatar Feb 04 '23 13:02 hrydgard