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

Fix too many overlay breaking item and screen rendering (#1504 and #1553) #1555

Open
wants to merge 6 commits into
base: 1.21.x
Choose a base branch
from

Conversation

lcy0x1
Copy link
Contributor

@lcy0x1 lcy0x1 commented Sep 19, 2024

Fix #1504
Fix #1553

Issue #1504 is caused by having too many overlays translate the far plane too far off.
Issue #1553 is caused by having too many overlays before hotbar translating z-axis too high and cause floating point underflow.

This PR use depth-overwrite technique to allow overlays to be rendered at the same depth, so that it eliminates the need for overlays to be translated 200 units in Z for every overlay.

Removing Z-translation fix 1553, and stop overlay count from affecting farPlane fix 1504

@neoforged-pr-publishing
Copy link

  • Publish PR to GitHub Packages

@XFactHD XFactHD added bug A bug or error rendering Related to rendering 1.21.1 Targeted at Minecraft 1.21.1 labels Sep 19, 2024
@XFactHD XFactHD self-assigned this Sep 19, 2024
@lcy0x1
Copy link
Contributor Author

lcy0x1 commented Sep 28, 2024

@XFactHD In the newest push, Z-compressing now becomes opt-in. I call it at the beginning of Gui::renderHotBar and the end of GuiLayerManager::renderInner.

This would effectively reduce draw calls from 1 per later to 2 in total by default. Hope this would address your concern regarding performance.

@neoforged-automation
Copy link

@lcy0x1, this pull request has conflicts, please resolve them for this PR to move forward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.21.1 Targeted at Minecraft 1.21.1 bug A bug or error needs rebase rendering Related to rendering
Projects
None yet
2 participants