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

GPU: Add a small error-compensation to depth clip #16380

Merged
merged 1 commit into from
Nov 13, 2022

Conversation

unknownbrackets
Copy link
Collaborator

This was causing a depth that should've calculated as zero to be clipped, because the multiply and division resulted in a value that was off by about 2 / pow(2, 24) in the negative direction. Fixes #15816. I think this small a value should just be safe, and might fix other similar cases.

Using 1/16 of 1/65536, but keeping the terms separate for clarity since PSP depth is 65536.

-[Unknown]

This was causing a depth that should've calculated as zero to be clipped,
because the multiply and division resulted in a value that was off by
about 2 / pow(2, 24) in the negative direction.
@unknownbrackets unknownbrackets added this to the v1.14.0 milestone Nov 13, 2022
@hrydgard hrydgard merged commit 1a0e5c1 into hrydgard:master Nov 13, 2022
@unknownbrackets unknownbrackets deleted the depth-clip-err branch November 13, 2022 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Boku no Natsuyasumi 4: Setouchi Shounen Tanteidan missing part of the title screen
2 participants