Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syphon Filter Dark Mirror - lights are visible through buildings #10229

Closed
Leopard20 opened this issue Dec 2, 2017 · 18 comments · Fixed by #16907
Closed

Syphon Filter Dark Mirror - lights are visible through buildings #10229

Leopard20 opened this issue Dec 2, 2017 · 18 comments · Fixed by #16907
Labels
GE emulation Backend-independent GPU issues
Milestone

Comments

@Leopard20
Copy link
Contributor

Leopard20 commented Dec 2, 2017

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

@unknownbrackets
Copy link
Collaborator

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]

@Leopard20
Copy link
Contributor Author

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

@Leopard20
Copy link
Contributor Author

Leopard20 commented Dec 4, 2017

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

@Leopard20 Leopard20 changed the title (Android) Syphon Filter Dark Mirror - lights are visible through buildings Syphon Filter Dark Mirror - lights are visible through buildings Dec 4, 2017
@hrydgard
Copy link
Owner

hrydgard commented Dec 4, 2017

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)

@unknownbrackets
Copy link
Collaborator

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]

@Leopard20
Copy link
Contributor Author

Leopard20 commented Dec 4, 2017

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

@benderscruffy01
Copy link

the same as #6105

@hrydgard
Copy link
Owner

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

@unknownbrackets
Copy link
Collaborator

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]

@ghost
Copy link

ghost commented Nov 2, 2020

Also affects Resistance.

@hrydgard hrydgard modified the milestones: v1.12.0, v1.13.0 Jul 9, 2021
@oldmario
Copy link

oldmario commented Nov 14, 2021

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

@LunaMoo
Copy link
Collaborator

LunaMoo commented Nov 15, 2021

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.

@Kayael76
Copy link

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

@ghost
Copy link

ghost commented Aug 2, 2022

How about this now?
#15772 or #15700 might help this.

@ghost
Copy link

ghost commented Aug 3, 2022

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

@QrTa
Copy link

QrTa commented Aug 30, 2022

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

@LeyoSFO
Copy link

LeyoSFO commented Nov 29, 2022

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

@hrydgard
Copy link
Owner

hrydgard commented Feb 4, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GE emulation Backend-independent GPU issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants