Skip to content

feat(extensions): support WebGPU brushing with ShaderPlugins - #10988

Merged
ibgreen merged 4 commits into
masterfrom
codex/brushing-webgpu
Nov 4, 2026
Merged

ibgreen merged 4 commits into
masterfrom
codex/brushing-webgpu

Conversation

@ibgreen

@ibgreen ibgreen commented Oct 31, 2026 •

Copy link
Copy Markdown
Collaborator

Background

Brushing needs WebGPU support without layer-specific attribute or varying rewrites. luma.gl alpha.10 now supplies the portable ShaderPlugin interface.

Depends only on shared preparation #10996; independent of Clip and DataFilter.

Some background: we’re porting deck.gl extensions to WebGPU using luma.gl’s new ShaderPlugin API.

  • A luma ShaderModule contains:
    • GLSL/WGSL shader source
    • Uniform definitions
    • Module dependencies
  • A luma ShaderPlugin additionally defines:
    • Hooks with GLSL/WGSL implementations
    • Injections with GLSL/WGSL implementations
    • Vertex input definitions
    • Inter-stage variable (varying) definitions

The critical new feature is that luma.gl ShaderPlugins handle the required “surgery” on WGSL shader source code. In WGSL, adding an attribute or varying cannot be done simply by adding global declarations as in GLSL. It requires editing the main shader functions’ parameters and input/output structs, and carefully assigning attribute and varying locations.

deck.gl retains attribute creation, accessor updates, and extension lifecycle management. luma.gl ShaderPlugins handle shader composition. This gives Brushing, Clip, and DataFilter a common path across both backends.

Change List

  • Target shared GLSL/WGSL hook names from feat(core): prepare WebGPU shader hooks for extensions #10996
  • Port BrushingExtension through one ShaderPlugin module
  • Declare vertex inputs and inter-stage variables through luma.gl
  • Use explicit injection stages with GLSL/WGSL sources
  • Add WebGPU example tab
  • Add composition, picking, and accessor-update tests
  • Update documentation

Verified: rebased onto master after #10996. Full build and lint passed with luma.gl alpha.10. CI rerunning.


Note

Low Risk
Changes are isolated to the brushing shader extension and its documentation, with comprehensive WebGPU test coverage and preserved WebGL behavior.

Overview
Adds WebGPU support to BrushingExtension using luma.gl ShaderPlugin interfaces, enabling GPU data brushing, picking, and composition with ClipExtension across standard rendering primitives in @deck.gl/layers and @deck.gl/mesh-layers.

Updates brushingPlugin with WGSL shader sources, injected vertex inputs, and inter-stage variables, and renames the internal brushing uniform target field from target to targetMode.

Adds a WebGPU test suite validating pipeline creation across primitive layers, target modes, live accessor updates, and picking behavior, alongside documentation updates and website example device switching.

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

@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-10-31T22:25:20.555145Z
We couldn’t complete this review. Comment @codex review to try again.
0bc0c3c 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

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.

@greptile-apps

greptile-apps Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; the required release note is now present.

Summary

BrushingExtension gains WebGPU support through ShaderPlugin.

  • Brushing filters supported layers on WebGPU as well as WebGL.

The latest change adds the previously requested release note. No new actionable issues were found.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[Layer attributes and pointer position] --> B[Brushing shader plugin]
  B --> C[GLSL or WGSL position hook]
  C --> D[Visibility value]
  D --> E[Fragment color hook]
  E --> F[Render or discard]
Loading

Reviews (15) · Last reviewed commit: "docs: note WebGPU brushing support" · Reviewed by Greptile

@coveralls

coveralls commented Nov 1, 2026 •

Copy link
Copy Markdown

Coverage Status

coverage: 84.751% (-0.001%) from 84.752% — codex/brushing-webgpu into master

@ibgreen
ibgreen force-pushed the codex/brushing-webgpu branch from 5eedaec to 14a8928 Compare November 2, 2026 23:38
@ibgreen
ibgreen changed the base branch from master to codex/extension-shader-plugin-prep November 2, 2026 23:38
@ibgreen
ibgreen force-pushed the codex/extension-shader-plugin-prep branch from 4f9fdcc to 3bff823 Compare November 4, 2026 00:02
@ibgreen
ibgreen force-pushed the codex/brushing-webgpu branch 3 times, most recently from a60849e to c49d9bd Compare November 4, 2026 01:41
@ibgreen
ibgreen force-pushed the codex/extension-shader-plugin-prep branch from 2a816bd to 86e6032 Compare November 4, 2026 03:01
Base automatically changed from codex/extension-shader-plugin-prep to master November 4, 2026 03:12
@ibgreen
ibgreen force-pushed the codex/brushing-webgpu branch from a4062dc to 16cf3d8 Compare November 4, 2026 03:17
@ibgreen
ibgreen force-pushed the codex/brushing-webgpu branch from 16cf3d8 to 2d788ee Compare November 4, 2026 14:21
@ibgreen
ibgreen merged commit 31adfde into master Nov 4, 2026
9 checks passed
@ibgreen
ibgreen deleted the codex/brushing-webgpu branch November 4, 2026 14:36
@ibgreen ibgreen mentioned this pull request Nov 19, 2026
42 of 61 tasks
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.

2 participants