Skip to content

feat(geo-layers): port TripsLayer to WebGPU - #10484

Merged
ibgreen merged 3 commits into
masterfrom
codex/webgpu-trips-layer
Aug 1, 2026
Merged

ibgreen merged 3 commits into
masterfrom
codex/webgpu-trips-layer

Conversation

@ibgreen-openai

Copy link
Copy Markdown
Collaborator

Stack

Stacked on #10113 (ib/path-layer-webgpu). This PR contains only the additional TripsLayer changes; it reuses the parent PathLayer implementation without copying or modifying it. Retarget this PR to master after #10113 lands.

Summary

Port TripsLayer to WebGPU by extending the WGSL PathLayer supplied by #10113.

The existing WebGL timestamp attributes, GLSL shader injections, trail fading, and reference-image rendering remain unchanged.

Changes

  • Add a WGSL-compatible trips uniform block while retaining the existing GLSL block.
  • Extend PathLayer's WGSL with interpolated segment timestamps, animated time-window clipping, and fading trails without duplicating the path shader.
  • Pack each segment's current and next timestamps into a single vec2<f32> vertex attribute.
  • Include instanceTimestamps in PathLayer's existing path-instance-data buffer group using the landed grouped-attribute support.
  • Preserve the existing WebGL vertexOffset attributes and GLSL injections.
  • Enable device tabs for the Manhattan taxi example.
  • On WebGPU only, omit the example's unrelated polygon ground/building decorations and shadow effects until those separate ports land; the full WebGL example is unchanged.
  • Add tests for timestamp packing, WGSL shader injection, real WebGPU pipeline initialization, correct grouped vertex layouts, and GPU shader-validation errors.
  • Mark TripsLayer supported in the WebGPU developer guide.

Website example

Layer / example Route WebGPU result
TripsLayer — Yellow Cab vs. Green Cab Trips in Manhattan /examples/trips-layer Animated trails with interpolated timestamps, time-window clipping, and fading.

WebGL compatibility

The existing WebGL timestamp layout, GLSL hooks, polygon decorations, shadow effects, and TripsLayer/PathLayer golden images are unchanged.

Validation

  • yarn build
  • yarn lint
  • yarn test-website
  • yarn test-headless test/modules/geo-layers — 78 passing, 1 pre-existing skip.
  • yarn test-render test/render/test-cases/trips-layer.spec.ts test/render/test-cases/path-layer.spec.ts — all 10 WebGL reference images.
  • Real WebGPU-backed TripsLayer initialization, grouped-attribute validation, and GPU error-scope test.
  • Browser verification of the 10,000-trip website example with the WebGPU device tab selected.

@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: bf80a85aff

ℹ️ 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".

@coveralls

coveralls commented Jul 25, 2026 •

Copy link
Copy Markdown

Coverage Status

coverage: 83.084% (-0.04%) from 83.128% — codex/webgpu-trips-layer into master

Base automatically changed from ib/path-layer-webgpu to master July 27, 2026 01:31
@ibgreen-openai
ibgreen-openai force-pushed the codex/webgpu-trips-layer branch from 000aebd to 177714b Compare July 27, 2026 20:23
@ibgreen-openai ibgreen-openai mentioned this pull request Jul 27, 2026
42 of 61 tasks
@ibgreen
ibgreen force-pushed the codex/webgpu-trips-layer branch from 177714b to 747e6b6 Compare August 1, 2026 17:57
@ibgreen
ibgreen merged commit 3561d99 into master Aug 1, 2026
3 checks passed
@ibgreen
ibgreen deleted the codex/webgpu-trips-layer branch August 1, 2026 18:06
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.

4 participants