feat: Row index based picking#10302
Open
ibgreen-openai wants to merge 1 commit into
Open
Conversation
02043f3 to
e00bb1f
Compare
e00bb1f to
f86a146
Compare
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.
row-index based picking
Summary
This PR replaces remaining explicit color-encoded picking buffers with semantic
rowIndexesuint32 buffers.All custom picking attributes are now called rowIndexes and contain canonical uint32 row/feature ids rather than obscure picking colors.
Instead of storing pre-encoded RGB picking colors in
pickingColors/instancePickingColors, layers that need custom vertex/instance to row mappings now store the logical object or feature id directly inrowIndexes, and the shader derives the picking color withpicking_getPickingColorFromIndex(rowIndexes).Why
rowIndexesare a more natural representation than encoded color bytes:uint32value instead of RGB/RGBA byte tuplesBuilt-in one-instance-per-object layers still use
gl_InstanceID/instance_index. ExplicitrowIndexesare only used where the logical picking id differs from the rendered instance id.What Changed
rowIndexesas the unified explicit picking-index attribute.rowIndexes.pickingColors/instancePickingColorssupport in core for compatibility.rowIndexes.Layer Cases
rowIndexesRepresentsPathLayerMultiIconLayerSolidPolygonLayer__source.indexfor composite dataIconLayer/ScatterplotLayerbinary hooksMeshLayerfeature-id pickingTesting
npx tsc -p modules/core/tsconfig.json --noEmitnpx tsc -p modules/layers/tsconfig.json --noEmit