Skip to content

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

Merged
hrydgard merged 1 commit intohrydgard:masterfrom
unknownbrackets:depth-zero-scale
Mar 5, 2023
Merged

GPU: Correct depth clip/cull for zero scale#17055
hrydgard merged 1 commit intohrydgard:masterfrom
unknownbrackets:depth-zero-scale

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