Skip to content

webgl's filter function exhibits different behavior in handling transparency than in 1.7.0 #6514

@inaridarkfox4231

Description

@inaridarkfox4231

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)

p5.js version

1.8.0

Web browser and version

Chrome

Operating System

Windows11

Steps to reproduce this

Steps:

  1. Apply filter(INVERT) to images with transparent background.
  2. Paste it onto an opaque canvas.
  3. The results obtained are different between 1.7.0 and 1.8.0.

Snippet:

function setup() {
  createCanvas(400, 400);
  let gr=createGraphics(100,100);
  gr.textAlign(CENTER,CENTER);
  gr.textSize(80);
  gr.text("🦊",50,50);
  gr.filter(INVERT);

  background(128);
  image(gr,100,100);
}

version 1.7.0

INVERT_170

version 1.8.0

INVERT_180

I'm going to report this as a bug, but I don't know if it can be considered a bug just because the behavior is different.

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