Skip to content

feat(aggregation): mask HeatmapLayer source points - #11208

Merged
ibgreen merged 10 commits into
masterfrom
codex/heatmap-mask-refresh
Nov 18, 2026
Merged

ibgreen merged 10 commits into
masterfrom
codex/heatmap-mask-refresh

Conversation

@ibgreen

@ibgreen ibgreen commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

Background

Refreshes the approach in #7397 against the current Heatmap and MaskEffect. Stacked on #11207 for the shared weight pass changes.

Change List

  • Refresh weights after mask channels are rendered
  • Preserve geometry masking on the display quad
  • Regenerate accumulation when mask geometry or channels change
  • Render tests compare refreshed masked weights on both devices

Verified: lint, 207 node tests, package build before the final fixture update, and masked and filtered render comparisons.


Note

Medium Risk
Modifies render pass orchestration between MaskEffect and HeatmapLayer weight accumulation and updates shader filtering hooks. Scope is largely contained to masked aggregation rendering and is backed by new render tests.

Overview
Adds support for MaskExtension in HeatmapLayer, allowing source points that contribute to the heatmap's weight accumulation pass to be filtered by mask geometry. Setting maskByInstance: false also enables clipping the final rendered heatmap display quad instead of filtering individual source points.

Updates MaskEffect to refresh masked aggregation layers whenever mask channels or boundaries change, ensuring weight textures regenerate once mask render targets are ready. In addition, weight and display shaders now hook into position and color filtering, and TriangleLayer evaluates its color domain dynamically at draw time.

Reviewed by Cursor Bugbot for commit 34fb53e. Bugbot is set up for automated code reviews on this repo. Configure here.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-18T20:36:47.024563Z 0a11827 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0a118275fa

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@greptile-apps

greptile-apps Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge based on this follow-up review.

Summary

Adds heatmap masking for source points or the final rendered surface, with weight updates after mask changes.

  • Heatmaps can filter source points or clip the displayed quad with a mask.

Reviews (10) · Last reviewed commit: "Update heatmap domain test for draw-time..." · Reviewed by Greptile

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

@coveralls

coveralls commented Nov 18, 2026 •

Copy link
Copy Markdown

Coverage Status

No base build to compare — codex/heatmap-mask-refresh into master

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Base automatically changed from codex/heatmap-weight-extensions to master November 18, 2026 22:00
@ibgreen
ibgreen force-pushed the codex/heatmap-mask-refresh branch from d96da95 to 47d1c8f Compare November 18, 2026 22:01

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 65a84f6. Configure here.

@ibgreen
ibgreen merged commit e747f95 into master Nov 18, 2026
9 checks passed
@ibgreen
ibgreen deleted the codex/heatmap-mask-refresh branch November 18, 2026 22:33
@ibgreen ibgreen mentioned this pull request Nov 19, 2026
42 of 61 tasks

@chrisgervang chrisgervang left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 34fb53e after merge; follow-ups below.

No P1s.

Labels: P1 settle before this is merged, P2 can follow, Non-blocking optional.


Generated by Claude Code

Comment thread docs/whats-new.md
### Heatmap filtering

- `DataFilterExtension` filters the points that contribute to `HeatmapLayer` on WebGPU.
- `MaskExtension` limits the source points that contribute to a heatmap. Set `maskByInstance: false` to clip the rendered heatmap.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: The HeatmapLayer behavior is only described in whats-new. The maskByInstance entry in mask-extension.md says it is "automatically deduced from the layer type", which does not tell a reader that a heatmap masks source points unless the prop is false.

Could we add that sentence to the maskByInstance entry and link the whats-new bullet to #maskbyinstance?


Generated by Claude Code

goldenImage: './test/render/golden-images/heatmap-lnglat.png'
},
{
// Golden: the polygon hole clips the entire display quad contribution.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking: This golden is empty, so the case also passes if the heatmap draws nothing. Could the hole cover half the blob, so the golden shows a clipped edge?


Generated by Claude Code

// debugFBO(this.maskMap, {opaque: true});
const channelRemoved =
previousMasks && Object.keys(previousMasks).some(id => !this.masks?.[id]);
this._updateMaskedAggregations(layers, didRender || Boolean(channelRemoved));

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking: A mask larger than twice the viewport makes the masked heatmap reaccumulate every point on each pan frame. Could the refresh skip frames where only the mask texture bounds moved?

Details
  • getRenderBounds clips large masks to the padded viewport, so didRender is true on every pan.
  • The unmasked heatmap reuses its texture until the view leaves worldBounds.

Generated by Claude Code

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your trial has ended. Reactivate Greptile to resume code reviews.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants