Skip to content

Conversation

@hrydgard
Copy link
Owner

Previously, we tried to repurpose the viewport mechanism in the various graphics APIs to implement the PSP's viewport registers, even though the functionality is not very well matched. This resulted in a lot of hackery of the projection matrix and other tricks.

Instead, this PR tries to implement the PSP's viewport mechanism directly in the vertex shader, bypassing a number of problems. This leads to the simplification of a bunch of code.

So far this is just a proof-of-concept, showing that we can simplify code a lot, but doesn't properly re-implement everything yet (for example, the minz/maxz registers are not currently working correctly). But it's promising.

This is aimed for 1.21, not 1.20. But with this we will be able to fix several old rendering issues, and also more easily work on solutions for other problems. See #20223 for more information.

@hrydgard hrydgard added this to the v1.21 milestone Jan 12, 2026
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.

2 participants