You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Speed: copying data between p5.Graphics in WebGL can be slow, and can prevent users from using filter() if the rest of their sketch is already heavier on performance, or needs to run on low-power devices like phones. If we can use framebuffers for WebGL canvas filters, we can let filters run at their maximum efficiency.
Consistency: If we can run filters on framebuffers too, p5 will work more consistently across its different data types, and hopefully make this feature more predictable and easier to understand.
Most appropriate sub-area of p5.js?
Accessibility
Color
Core/Environment/Rendering
Data
DOM
Events
Image
IO
Math
Typography
Utilities
WebGL
Build Process
Unit Testing
Internalization
Friendly Errors
Other (specify if possible)
Feature enhancement details
I think this has two components:
In WebGL mode, running filters on a dedicated framebuffer instead of a dedicated canvas for maximum speed
After doing so, make sure that filter() still works when in between a user framebuffer's begin() and end()
The text was updated successfully, but these errors were encountered:
@davepagurek
I would like to work on this issue.
As you have mentioned and if I understand correctly, the p5.Graphics object needs to be replaced with a p5.Framebuffer object like so
filter(...args) {
// let pg = this.getFilterGraphicsLayer();
let pg = this._getTempFramebuffer();
...
}
For the BLUR filter, the same way of getting a framebuffer should work and getFilterGraphicsLayerTemp() would not be required anymore.
I don't think I've understood the second step very well but would you let me know if I am on the right path as of now?
Increasing Access
p5.Graphics
in WebGL can be slow, and can prevent users from usingfilter()
if the rest of their sketch is already heavier on performance, or needs to run on low-power devices like phones. If we can use framebuffers for WebGL canvas filters, we can let filters run at their maximum efficiency.Most appropriate sub-area of p5.js?
Feature enhancement details
I think this has two components:
filter()
still works when in between a user framebuffer'sbegin()
andend()
The text was updated successfully, but these errors were encountered: