Skip to content

[p5.js 2.0+ Bug Report]: Multiple filter() calls of p5.Graphics doesn't work correctly #8790

@davepagurek

Description

@davepagurek

Most appropriate sub-area of p5.js?

  • Accessibility
  • Color
  • Core/Environment/Rendering
  • Data
  • DOM
  • Events
  • Image
  • IO
  • Math
  • Typography
  • Utilities
  • WebGL
  • WebGPU
  • p5.strands
  • Build process
  • Unit testing
  • Internationalization
  • Friendly errors
  • Other (specify if possible)

p5.js version

2.2.3

Web browser and version

All

Operating system

All

Steps to reproduce this

Steps:

  1. Create a p5.Graphics
  2. Draw something to it
  3. Apply a filter
  4. Draw something else
  5. Apply another filter

Snippet:

function setup() {
  createCanvas(200, 200)
  const g = createGraphics(200, 200)
  g.noStroke()
  g.fill('red')
  g.circle(20, 20, 20)
  g.filter(BLUR, 2)
  g.circle(80, 80, 20)
  image(g, 0, 0)
}

On 1.x:

Image

On 2.x:

Image

Live: https://editor.p5js.org/davepagurek/sketches/Wn0aVF-RE

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Completed

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions