Skip to content

GPU: Correct depth clip/cull for zero scale #17055

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

Merged
merged 1 commit into from
Mar 5, 2023

Conversation

unknownbrackets
Copy link
Collaborator

Fixes #16992. We had -INF and other problems in the clip distance and cull distance formulas, because zero depth scale was factored in.

This essentially disables depth culling when depth viewport scale is set to zero, which might technically be wrong. That said, I've seen very few games set the scale to zero and I don't want to add more uniforms and matrix multiplies to get the original depth. Software is accurate here.

-[Unknown]

@unknownbrackets unknownbrackets added this to the v1.15.0 milestone Mar 5, 2023
@hrydgard
Copy link
Owner

hrydgard commented Mar 5, 2023

Yeah, this should be fine.

@hrydgard hrydgard merged commit 74f9b55 into hrydgard:master Mar 5, 2023
@unknownbrackets unknownbrackets deleted the depth-zero-scale branch March 5, 2023 23:04
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.

Kidou Keisatsu Patlabor - Kamubakku MiniPato Black screen in beginning
2 participants