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

softgpu: Correctly fix inversions, matching tests #16470

Merged
merged 1 commit into from
Dec 1, 2022

Conversation

unknownbrackets
Copy link
Collaborator

@unknownbrackets unknownbrackets commented Dec 1, 2022

Inversions are allowed just fine, but if clipping results in coordinates outside range, the triangle should be culled. Fixes more wanted inversions.

It feels stupidly obvious now why the particular Z value I found was such an arbitrary threshold, it was causing the screen coordinates to go out of bounds. I should've been checking them.

This seems to cull in all the correct places, at least in the frame dumps I've gathered. I haven't tested some of the latest from #16131 yet but this makes a lot of sense and matches the previous ones.

Fixes the case in #16207 (better than hardware, there's an innocent inversion Vulkan/etc. draw which the PSP doesn't), fixes #15875. Takes care of #11376 in software only, as well as #10914 (both of those are still issues in hardware renderers.)

-[Unknown]

Inversions are allowed just fine, but if clipping results in coordinates
outside range, the triangle should be culled.  Fixes more wanted
inversions.
@hrydgard
Copy link
Owner

hrydgard commented Dec 1, 2022

Very nice, and makes total sense, hah.

@hrydgard hrydgard merged commit 4b70844 into hrydgard:master Dec 1, 2022
@unknownbrackets unknownbrackets deleted the softgpu-inversion branch December 1, 2022 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IL-2 Sturmovik - Birds of Prey graphic glitches in software renderer
2 participants