-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Translucent Sorting #1340
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
Translucent Sorting #1340
Conversation
…ve the renderer sort it all out. Picking is broken though.
Source/Core/BoundingSphere.js
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could use an @example
.
Update CHANGES.md. No need to mention the code changes deep in the renderer, but we should mention that we improved the visual quality of overlapping translucent objects. |
Source/Renderer/Pass.js
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid DOC_TBA
in new code.
Tests and examples are good. |
Source/Scene/Scene.js
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comparison function used with Array.sort
is supposed to return (negative/zero/positive) for a
(less/equal/greater) b
, so I think you want to subtract the distances here.
@pjcozzi This is ready for another review. That last commit feels like a hack to me. Something needed to be added to the commands so they weren't sorted. Adding an index made it so that it worked for |
Conflicts: CHANGES.md
Let me know when this is ready for another review. I can help design the |
Conflicts: Source/Core/BoundingSphere.js Specs/Core/BoundingSphereSpec.js
Conflicts: Source/Renderer/Pass.js Source/Scene/Scene.js
Conflicts: CHANGES.md
Should we close this for now? |
Sorts translucent objects back-to-front for correct ordering. Uses the distance from the command bounding sphere to the camera. We might want to update the other bounding volumes so there can be tighter bounding volumes for commands.