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 terrain rendering incorrectly when far from origin #790

Merged
merged 2 commits into from
Dec 13, 2024

Conversation

embeddedt
Copy link
Collaborator

To reproduce, teleport to a far-away coordinate on one dimension (e.g. 16777216 70 320). Blocks will start to render inaccurately. This is caused by RenderBlocks being given the world-space coordinates for block rendering, while using floats internally. The fix is to give RenderBlocks subchunk-relative coordinates and a fake IBlockAccess that translates back to world-relative coordinates that the rest of the modernized Angelica stack expects.

@embeddedt
Copy link
Collaborator Author

This will fix #422.

@mitchej123 mitchej123 enabled auto-merge (squash) December 13, 2024 18:11
@mitchej123 mitchej123 merged commit df66218 into master Dec 13, 2024
1 check passed
@mitchej123 mitchej123 deleted the fix-issues-at-high-offsets branch December 13, 2024 18:14
@nshepperd
Copy link
Contributor

This broke rendering for most AE2 blocks (smart cables, interfaces, etc). They're getting rendered in the wrong location, I assume they have some custom rendering that assumes world space coordinates but haven't looked into it at all. I noticed this when I was testing our PRs today.

2024-12-17_09 05 21

@embeddedt
Copy link
Collaborator Author

Pain. Thanks for flagging that.

embeddedt added a commit that referenced this pull request Dec 16, 2024
@embeddedt embeddedt mentioned this pull request Dec 16, 2024
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.

angelica rendering method has block face leaking problem, also brings far lands back
3 participants