Repository navigation
1.12.2 Frustum Optimization Forward-Port - #85
Merged
NotStirred merged 9 commits intoNov 23, 2026
Merged
Conversation
…1.21.6 for CC3
Member
|
|
DaMatrix
reviewed
Sep 3, 2026
DaMatrix
left a comment
Member
There was a problem hiding this comment.
why not leave the original comments? or write better ones if you don't like them (i admit that mine may be somewhat inscrutable to anyone other than me), but this code is somewhat incomprehensible by itself
Contributor
Author
|
I left out the comments when writing the code, admittedly I didn't do a direct copy + paste and went about it by referencing piece by piece; starting with cleanup of the vanilla loop, then getting the rest of the logic converted correctly adding my comments as a final step before the PR |
…a movement In CC2 section and cube sizes differ, moving to a different section in the same cube caused no update. Use the section position passed to repositionCamera instead. This comes from the camera rather than the camera entity, which can differ (e.g. in third person), and repositioning is no longer skipped when there is no camera entity.
The ported calculation mixed cube and section coordinates and once those were both in sections (ec6b610), always resolved to the same index regardless of the camera position, so the wrong slab was updated.
px/py/pz are the lowest visible section on each axis, so name them minX/minY/minZ and compute them from cameraX/Y/Z like the rest of the method. originX/Y/Z are section coordinates passed to setSectionNode rather than block origins, so name them sectionX/Y/Z. Use idxZ/idxYZ consistently for the flattened array offsets. No functional change.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For my first contribution to CC3; with permission of DaPorkchop, I have ported their 1.12.2 Frustrum Optimization PR (OpenCubicChunks/CubicChunks#782) into CC3 on 1.21.6
I tackled this as this felt like a decent first thing for me to ease myself into such a large project like this, hoping over the coming days/weeks I can contribute much more significant developments.