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

Bug with projection matrix when rendering the cube #6

Open
silbinarywolf opened this issue Dec 16, 2023 · 1 comment
Open

Bug with projection matrix when rendering the cube #6

silbinarywolf opened this issue Dec 16, 2023 · 1 comment

Comments

@silbinarywolf
Copy link
Contributor

I'm aware this project isn't maintained now but I figured I'd track this bug in the project anyway incase someone else wanted to resolve it.

Details here:
hrydgard/ppsspp#17981 (comment)

OK, investigated this in RenderDoc.

The entire cube gets clipped away, I guess we're just very slightly off from what the real PSP is doing.

The reason this is happening is that there's a digit missing in the projection matrix, causing it to squish the cube flat against the Z=0 plane, so this cube will not depth test properly against anything else. The perspective projected texturing still works (if you pass the clipping) since the W coordinate is computed correctly.

289694398-f29450a8-7eb6-4f1a-b7d2-b4a3f32bcb86

Note how the third row (actually column, I believe, but viewed transposed) of the matrix is 0.0f. There should be at least one non-zero number in there.

@IridescentRose
Copy link
Collaborator

IridescentRose commented Dec 18, 2023

Interesting bug; I think that's probably part of the depth range -- I will work on this project more when I have more time.

Edit: Very interesting -- I'll have to debug this in more depth.

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

No branches or pull requests

2 participants