Skip to content

Conversation

@davepagurek
Copy link
Contributor

@davepagurek davepagurek commented May 6, 2025

Resolves #7793

Changes:

  • Instead of eagerly updating readable textures, they're updated only when accessed (either bound to a shader, or read with loadPixels() or get())

Live: https://editor.p5js.org/davepagurek/sketches/OSidpT1D1

For me in Chrome, with TEST_PERF_UPDATE=false, this sketch runs at 8fps in Firefox and 10fps in Chrome. With TEST_PERF_UPDATE=true, it hits 60 fps in both. This performance improvement scales with the size of the canvas and the number of framebuffer draws.

PR Checklist

@davepagurek davepagurek merged commit a7c1845 into dev-2.0 May 6, 2025
2 checks passed
@davepagurek davepagurek deleted the feat/antialiased-fbo-perf branch May 6, 2025 16:51
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.

2 participants