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

Eliminate inf values resulting from depth range computation. #18535

Merged
merged 1 commit into from
Dec 12, 2023

Conversation

hrydgard
Copy link
Owner

Fixes #17981

Who knows, might fix something else. It seems the actual PSP does something similar to this since the Zig sample does work on hardware, and also in the software rasterizer actually.

@hrydgard hrydgard added the GE emulation Backend-independent GPU issues label Dec 12, 2023
@hrydgard hrydgard added this to the v1.17.0 milestone Dec 12, 2023
@hrydgard hrydgard merged commit 9f35f90 into master Dec 12, 2023
18 checks passed
@hrydgard hrydgard deleted the fix-zig-sample branch December 12, 2023 18:13
@anr2me
Copy link
Collaborator

anr2me commented Dec 12, 2023

It's kinda strange for infinite number (which supposed to be close to the largest possible value, eg. due to division by near zero value) to be replaced by 0 :) but as long it works

@hrydgard
Copy link
Owner Author

Yeah the code sample in this case is just busted - Z is entirely broken, it's just not noticable because it's a single, backfaceculled cube.

@unknownbrackets
Copy link
Collaborator

Oops, should've considered this case. Maybe somehow related to that other game that sets Z range to 0-0 and had problems on some GPUs...

-[Unknown]

@hrydgard
Copy link
Owner Author

Well, it's easy to forget that checking for division by zero isn't sufficient to avoid infs...

What game was that again?

@unknownbrackets
Copy link
Collaborator

Ah, I was thinking of "Stand O' Food" but I think it was already fixed by something else.

-[Unknown]

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 this pull request may close these issues.

Zig-PSP Homebrew example program won't emulate
3 participants