-
-
Notifications
You must be signed in to change notification settings - Fork 362
Ignore volume box z values #5225
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
Merged
Merged
Conversation
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
Collaborator
Benchmark ResultsSHA: 2829a39d90ac318cdbb92cdf48483ba168a26952 Warning These results are subject to substantial noise because GitHub's CI runs on shared machines that are not ideally suited for benchmarking. |
Collaborator
Author
SimonDanisch
approved these changes
Aug 5, 2025
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.



Description
Fixes https://discourse.julialang.org/t/unwanted-clipping-at-corners-of-glmakie-3d-plot/131053
Volumes are drawn in a box, where the backside of the box "renders". If fragments (pixels) of this box end up outside the near .. far range, OpenGL/WebGL will clip them. And if they get clipped, the entire ray trace for that pixel gets clipped.
To avoid this, the pr hard-codes clip space z coordinates to 0, which should always pass the clipping test
-w <= z <= w. For volume plots that don't write z values during ray tracing (or turn it off withenable_depth = false) this may change the z ordering between volume plots and other elements. If I'm not mistaken volumes should end up in front of things more often. I don't think that matters much, because the z ordering was already wrong to begin with. If it does, we could usez = wto move them to the far plane orz = -wto move them to the near plane, instead of the center.Type of change
Checklist