Visitar URL original
Port CollisionFilterExtension to WebGPU by ibgreen · Pull Request #11026 · visgl/deck.gl · GitHub
Skip to content

Port CollisionFilterExtension to WebGPU - #11026

Merged
ibgreen merged 3 commits into
masterfrom
codex/collision-filter-webgpu
Nov 4, 2026
Merged

ibgreen merged 3 commits into
masterfrom
codex/collision-filter-webgpu

Conversation

@ibgreen

@ibgreen ibgreen commented Nov 4, 2026 •

Copy link
Copy Markdown
Collaborator

Background

CollisionFilter uses an offscreen picking map to hide overlapping features. This adds WebGPU collision ordering and visibility sampling.

Change List

  • Use one shader module and plugin for WebGL and WebGPU, with language-specific source and injections
  • Declare collision priority and visibility varyings through the shared plugin interface
  • Handle WebGPU depth ordering and top-left collision-map coordinates
  • Add WebGPU map and orthographic render cases

Validation

  • yarn build and yarn lint
  • Focused collision-filter headless tests on WebGL and WebGPU
  • WebGPU collision render cases: 6 passed, 1 skipped
  • WebGL render comparison: 8 passed; 3 globe cases differ from goldens by the same amounts on the original PR head

WebGPU globe comparisons differ from WebGL goldens, including with collision filtering disabled. Picking parity remains to be verified.


Note

Low Risk
Low risk; adds WGSL shader definitions and render test coverage for collision filtering without altering existing WebGL functionality.

Overview
Adds WebGPU support to CollisionFilterExtension by introducing WGSL shader implementations alongside existing GLSL shaders.

The shader module defines WGSL uniforms, texture bindings, coordinate mapping adjusted for WebGPU's top-left texture convention, and depth sorting normalized to the [0, 1] range. Priority attributes and inter-stage fade variables are now declared through ShaderPlugin metadata instead of manual GLSL declarations.

Also adds WebGPU test runs for map and orthographic views in the collision filter render test suite.

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

@coveralls

coveralls commented Nov 4, 2026 •

Copy link
Copy Markdown

Coverage Status

coverage: 84.727%. remained the same — codex/collision-filter-webgpu into master

@ibgreen
ibgreen force-pushed the codex/collision-filter-webgpu branch from 2863f3e to fa70b06 Compare November 4, 2026 15:24
@ibgreen
ibgreen force-pushed the codex/collision-filter-webgpu branch from fa70b06 to 4578ccb Compare November 4, 2026 17:42
@ibgreen
ibgreen marked this pull request as ready for review November 4, 2026 18:03
@ibgreen
ibgreen requested a review from chrisgervang November 4, 2026 18:03
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-11-04T18:03:06.620107Z
We couldn’t complete this review. Comment @codex review to try again.
4578ccb Draft marked ready
ℹ️ 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

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@ibgreen
ibgreen merged commit 0e7c53f into master Nov 4, 2026
8 checks passed
@ibgreen
ibgreen deleted the codex/collision-filter-webgpu branch November 4, 2026 18:03
@greptile-apps

greptile-apps Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable issues were found.

Summary

Adds WebGPU collision filtering while retaining the GLSL path.

  • Collision filtering now orders and fades overlaps on WebGPU.

No actionable issues were found. This review checked source code; it did not run builds or render tests.

ibgreen explicitly identifies WebGPU globe comparison differences and unverified picking parity in the PR description. These acknowledged limitations are not reported again.

Reviews (1) · Last reviewed commit: "chore: remove unrelated collision extens..." · Reviewed by Greptile

@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 4578ccb after merge; follow-ups below. No P1s.

P2: developer-guide/webgpu.md:103 still marks CollisionFilterExtension ❌ on WebGPU. The table text is proposed in the #11024 follow-up. Line 78 also says TextLayer collision filtering requires WebGL, and the WebGPU render cases cover ScatterplotLayer only. Is TextLayer collision expected to work on WebGPU now, so that sentence can drop it?

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

// Cover the map and orthographic collision variants on WebGPU.
describe('webgpu', () => {
runRenderTestSuite(
testCases.filter(testCase => !testCase.name.endsWith('-globe')),

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: GlobeView cases are left out on WebGPU, and collision-filter-extension.md says nothing about WebGPU. Is collision filtering in GlobeView expected to work on WebGPU? If not, could Limitations say so? If it is, could a WebGPU golden cover it?

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