ppsspp
ppsspp copied to clipboard
Syphon Filter Dark Mirror - lights are visible through buildings
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
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]
Yes it happens on both backends. I don't have the PC version installed. I'll install it and report later.
Update: The issue also happens on the PC version, regardless of backend:
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)
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]
Oh. Well in that case, here it is: UCUS98641_0001.zip
the same as #6105
Certainly a similar outcome, but I don't think these games work the same.
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:
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]
Also affects Resistance.
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
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.
I made this pack and that's what I did, the lens-flare effect is just fully transparent.
How about this now? https://github.com/hrydgard/ppsspp/pull/15772 or https://github.com/hrydgard/ppsspp/pull/15700 might help this.
Using the ge dump issue can still reproduce.
Both hardware and software
Syphon Filter Logan's Shadow have the same lens flare (through the walls) problem
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
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.