2.2: WebGPU and bugfixes
The 2.2 minor release contains work on WebGPU rendering that has been going on over the past year! WebGPU mode is included in a core add-on now. This release also contains a number of improvements in documentation and p5.strands bugfixes.
To load both p5.js and WebGPU mode, add these two script tags to your sketch:
<script src="https://cdn.jsdelivr.net/npm/p5@2.2.0/lib/p5.js"></script>
<script src="https://cdn.jsdelivr.net/npm/p5@2.2.0/lib/p5.webgpu.js"></script>Then load WebGPU mode in createCanvas:
async function setup() {
await createCanvas(400, 400, WEBGPU);
}Read more about how it works and where we plan on taking it here!
You're also welcome to come by the Discord #webgpu channel 🌱
What's Changed 🎊
- Ported the stroke shader to WebGPU renderer by @lukeplowden in #7915
- Framebuffer support on WebGPU renderer by @davepagurek in #8008
- webgpu ci test by @tychedelia in #8023
- Add WIP WebGPU mode by @davepagurek in #8179
- Update release action to omit WebGPU tests, add TS tests by @davepagurek in #8337
- FES parameter validation decoration use
.apply()for faster function invocation by @limzykenneth in #8332 - Add WebGPU built files to npm releases by @davepagurek in #8338
- Make sure bytes are aligned in p5.Geometry by @davepagurek in #8340
- Fix WebGPU buffer memory leaks by @davepagurek in #8342
- Fix JSDoc return type for p5.Vector.cross (2.0) by @Geethegreat in #8346
- Add support for instanceID() in WebGPU mode by @davepagurek in #8348
- Fix WebGPU filters in CDN builds using duck typing for nodes (closes … by @Piyushrathoree in #8349
- Fix Camera.slerp for ortho by cloning projMatrix into uPMatrix when active by @nakednous in #8351
- fixed the issue with alpha blending - fixing blur remaining by @Piyushrathoree in #8354
- Support background(image) in WEBGL Renderer3D by @reshma045 in #8352
- Fix LogicalExpression (&&, ||) handling in p5.strands by @Aayushdev18 in #8359
- Fix p5.strands filters not working on minified code by @davepagurek in #8367
- More fixes for minified filters by @davepagurek in #8372
- Fix transforms in clip() by using shape system for primitives using manual method by @VANSH3104 in #8236
- Make sure text binds an index buffer by @davepagurek in #8393
- Fix font measurement with font families containing special characters by @davepagurek in #8391
- Fix for strands branching by @davepagurek in #8394
- Fix assignments to properties of
inputsin branches in p5.strands by @davepagurek in #8397 - Fix set() to support p5.Graphics objects by @VANSH3104 in #8326
- Fix type for shuffle() and add type test. by @nbogie in #8410
- Fix p5.strands parsing of named function callbacks by @davepagurek in #8414
New Contributors
- @tychedelia made their first contribution in #8023
- @Piyushrathoree made their first contribution in #8349
- @Aayushdev18 made their first contribution in #8359
Full Changelog: v2.1.2...v2.2.0