Skip to content
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

filter(OPAQUE) darkens semi-transparent colors #6528

Closed
2 of 17 tasks
davepagurek opened this issue Nov 6, 2023 · 0 comments · Fixed by #6529
Closed
2 of 17 tasks

filter(OPAQUE) darkens semi-transparent colors #6528

davepagurek opened this issue Nov 6, 2023 · 0 comments · Fixed by #6529

Comments

@davepagurek
Copy link
Contributor

davepagurek commented Nov 6, 2023

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

main branch

Web browser and version

Firefox 117

Operating System

macOS 14

Steps to reproduce this

Steps:

  1. Create semi transparent content
  2. Apply filter(OPAQUE)
    It currently is blending with black due to the filter not correctly handling premultiplied alpha.

Snippet:

function setup() {
  createCanvas(400, 400)
}

function draw() {
  clear()
  background(255, 0, 0, 50)
  filter(OPAQUE)
}

Live: https://editor.p5js.org/davepagurek/sketches/mJ1j4EOYl

@davepagurek davepagurek added the Bug label Nov 6, 2023
@davepagurek davepagurek changed the title filter(OPAQUE darkens semi-transparent colors filter(OPAQUE) darkens semi-transparent colors Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant