Skip to content

Conversation

@davepagurek
Copy link
Contributor

Resolves #7768

Changes:

When taking in a tint, the tint alpha also has to be multiplied with the other tint components.

We actually used to have this, but I "simplified" (broke) this when making a change to hide premultiplied alpha for shader hooks users. I actually even added tests before, but happened to pick test colors that are already maxed out, so you wouldn't be able to tell whether there was a problem or not. (I've updated the tests now to have some non-maxed out colors so that we can catch this if it breaks in the future.)

Screenshots of the change:

Before:
image

After:
image

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

PR Checklist

@davepagurek davepagurek merged commit 3738e3b into dev-2.0 Apr 22, 2025
2 checks passed
@davepagurek davepagurek deleted the fix/webgl-alpha branch April 22, 2025 22:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants