Perspective-Based Visibility Data Selection #3297
Draft
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.
Performs the generation of visibility data for a set of 8 perspectives, which each enable a different set of 3 allowed traversal directions through the chunk, and then combines them based on the camera's relative position to each chunk. As a side effect, this also prevents visibility paths through sections that contain opposing step directions from being accepted. Such paths are always invalid since they can never contain a straight view ray.
This implementation has some optimization potential, but I have also not measured the performance of the visibility data generation so I don't know how necessary it is. Feel free to review and suggest (or make) improvements. I'm going to keep this as a draft until we've tested and discussed it more thoroughly.
See discussion of my recent ideas on valid and invalid paths here. This is the implementation of this concept I suggested last year.
In my brief test, this reduced the section count from 4820 to 4512 in a simple overworld scene. More testing of its effectiveness and correctness is required.
A demonstration of how it can cull sections behind this section where no view ray is possible, which was previously not culled. (with all non-air blocks turned "opaque" for visualization)