Skip to content

Improve antialiased framebuffer performance #7794

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

Merged
merged 1 commit into from
May 6, 2025

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.

1 participant