Skip to content

Framebuffer support on WebGPU renderer #8008

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 22 commits into
base: webgpu
Choose a base branch
from
Open

Framebuffer support on WebGPU renderer #8008

wants to merge 22 commits into from

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