Fix WebGPU bugs surfaced by the Intro to Strands tutorial by davepagurek · Pull Request #8538 · processing/p5.js
Navigation Menu
{{ message }}
processing / p5.js Public
- Notifications You must be signed in to change notification settings
- Fork 3.7k
Merged
Fix WebGPU bugs surfaced by the Intro to Strands tutorial#8538
davepagurek merged 7 commits intodev-2.0from
Fix WebGPU bugs surfaced by the Intro to Strands tutorial#8538
davepagurek merged 7 commits intodev-2.0from
Conversation
Copy link
Contributor
davepagurek
commented
Feb 18, 2026
davepagurek
commented
Changes:
- In WGSL, you can't put an int in a vector constructor and have it auto-convert to float. I've updated p5.strands to auto cast int args into floats in vector constructors.
- There was a bug where textures in strands uniforms weren't getting added to the p5 shader, because they don't get packed into uniform structs like numeric uniforms. That's fixed now.
- I noticed a bunch of uses of
something instanceof StrandsNoderather thansomething.isStrandsNode, the latter being more robust against shared code in the WebGL/WebGPU built files where we might accidentally end up with two separateStrandsNodeclasses at runtime. I've updated those. - I Luke's sketch to the webgl and webgpu visual tests
https://editor.p5js.org/davepagurek/sketches/Cq_g72a9L
PR Checklist
-
npm run lintpasses - Inline reference is included / updated
- Unit tests are included / updated
davepagurek added 7 commits
February 17, 2026 19:55
davepagurek
deleted the
fix/tutorial-webgpu
branch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
