Repository navigation
Offset vector primitive depth by zIndex - #14145
Draft
danielzhong wants to merge 4 commits into
Draft
danielzhong wants to merge 4 commits into
danielzhong wants to merge 4 commits into
Conversation
…ctor-zindex-depth-offset # Conflicts: # packages/engine/Source/Scene/SymbologyLayer.js # packages/engine/Source/Scene/VectorPrimitive.js # packages/engine/Source/Scene/VectorStyle.js
…ctor-zindex-depth-offset
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.
Description
Ports the depth offset from #13515 to vector primitives.

Adds VectorPrimitive.zIndex. A non-zero value offsets the log depth written by the point shader (the existing POLYGON_OFFSET path in czm_writeLogDepth), so a primitive with a higher zIndex draws above coincident or nearly coincident geometry with a lower one, including across collections and styles.
SymbologyLayer.zIndex is applied to the primitives that VectorStyle creates.
The offset fixes z-fighting and overlapping layers. Features at clearly different depths still draw nearest on top; keeping labels above everything would need a separate screen-space pass. Points are offset only with a logarithmic depth buffer. Lines and polygons will follow once they have vector primitives; VectorPrimitive._addDepthOffset is shared for that.
Issue number and link
#13515
Testing plan
Sandcastle
Author checklist
CONTRIBUTORS.mdCHANGES.mdwith a short summary of my changeAI acknowledgment
If yes, I used the following Tools(s) and/or Service(s):
GitHub Copilot
If yes, I used the following Model(s):
Claude Opus 5.5