Skip to content

Conversation

davepagurek
Copy link
Contributor

This adds framebuffer support! To do that:

  • Everything renderer-specific has been moved out of p5.Framebuffer.js and moved into calls on its renderer
  • I had to update some multisampling stuff in WebGPU (notably, not all sample counts are supported)
  • I rewrote the loadPixels (and related method) implementations.
    • All WebGPU pixel loading methods are async now and must be awaited.
      • Previously, main canvas pixel loading worked if you never awaited anything, since the canvas texture is (temporarily) readable. But offscreen stuff would always need to be awaited. Rather than have some async and some sync, I'm opting to make all WebGPU pixel loading use the same method, which is async.
      • WebGL pixel loading is still synchronous as before.
  • I also updated images created via .get() to use the same pixel density as the source, rather than always downscaling to 1x.

PR Checklist

@davepagurek
Copy link
Contributor Author

interesting, our CI test runner is old enough that it doesn't have webgpu support. gotta look into that...

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.

1 participant