Repository navigation
feat(aggregation-layers): clip Heatmap points during WebGPU accumulation - #11218
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
[Medium impact] The follow-up changes appear safe to merge. SummaryAdds WebGPU heatmap source clipping for accessor data and borrowed GPU vectors, while keeping display-only clipping available.
No new actionable issues found in the follow-up changes. Reviews (2) · Last reviewed commit: "Rebuild Heatmap display shaders when cli..." · Reviewed by Greptile |
chrisgervang
left a comment
There was a problem hiding this comment.
Reviewed 8466418 after merge; follow-ups below. No P1s.
On WebGPU, source clipping tests each raw position against clipBounds with inclusive left and bottom edges, as instanced layers do. Both new WebGPU unit tests pass in CI.
Labels: P1 settle before this is merged, P2 can follow, Non-blocking optional.
Generated by Claude Code
| private _clipsSourcePoints(): boolean { | ||
| return this.context.device.type === 'webgpu' && this.props['clipByInstance'] !== false; | ||
| } |
There was a problem hiding this comment.
P2: By default WebGPU now drops outside points, so density spreads past the bounds. On WebGL the weight pass gets the clip-geometry plugin but no bounds, so I expect it to discard every splat.
- No WebGL test covers HeatmapLayer with ClipExtension. I did not run one.
Could the WebGL weight pass get the bounds or drop the plugin, with the docs saying what WebGL does?
Details
_clipsSourcePoints()is always false on WebGL, so_updateWeightmapskipsgetAggregationShaderPropsfor ClipExtension.- The
clip-geometryfilter at line 573 applies only on WebGPU, andweights-fs.glsl.tscallsDECKGL_FILTER_COLOR. - The clip module has no
defaultUniforms, so luma.gl startsboundsat zero.
Generated by Claude Code
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
For #10712
Background
Heatmap's WebGPU weight pass runs shader extension hooks but does not receive ClipExtension's bounds. Supply those bounds so excluded source points contribute no density.
Change List
Verified with lint, package build, and two Chromium WebGPU regression tests.
Note
Low Risk
Adds WebGPU clipping support to HeatmapLayer and ClipExtension with no impact on existing WebGL accumulation logic.
Overview
Adds support for
ClipExtensionto filterHeatmapLayersource points during WebGPU weight accumulation, including when using borrowedGPUVectorinputs.ClipExtensionnow implementsgetAggregationShaderPropsso aggregation passes can consume the same clip bounds as standard draw passes. InHeatmapLayer, clip uniform changes immediately invalidate the weight map and pass the clip parameters to the weight accumulation transform. When source points are clipped (clipByInstance !== false),ClipExtensionis omitted from the displayTriangleLayer; settingclipByInstance: falseroutes clipping to the rendered display quad instead.TriangleLayernow also rebuilds its model on extension changes to update shader plugins when toggling clip modes.Reviewed by Cursor Bugbot for commit 8466418. Bugbot is set up for automated code reviews on this repo. Configure here.