Repository navigation
Sort translucent quads in merged world sections - #338
Merged
Merged
Conversation
…, name the comparison thresholds
…eep model depth writes
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.
Translucent blocks merged into one section could hide the farther surface: their quads drew in placement order, so a nearer quad could draw before a farther one and block it. In the labeled-panel page from #336, blue B disappeared behind red A. Translucent model and water pages in section meshes now draw their quads back to front, as vanilla sorts translucent terrain.
VertexSorting.byDistance, re-sorted fromLevelRenderer.scheduleTranslucentSectionResortwhen the camera's block changes. Rotating the camera never re-sorts.The comparison page is provided by #336.
Sorting stays within each atlas page. Intersecting faces and faces in different pages or sections remain approximate; Three.js sorts those meshes as whole objects.
Validation:
yarn test(803 passed),yarn test:package(11),yarn test:api(18),yarn test:embed(15), andyarn test:node(6) pass locally.check demo/transparency/in Chrome reports PASS at every preset in both placement orders.