Skip to content

Framebuffer support for filter() #6521

@davepagurek

Description

@davepagurek

Increasing Access

  • 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()

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions