Skip to content

Conversation

@davepagurek
Copy link
Owner

Fixes #5

In p5 1.4.1, WebGL graphics/canvases default to not having an alpha channel to make alpha blending less confusing by default (thanks @SableRaf for finding this!) Previously, p5.Framebuffer would always have an alpha channel, leading to unexpected results in p5 1.4.1.

After this change:

  • The framebuffer will create an alpha channel if and only if the WebGL context it's attached to has one
  • The example sketch calls background(255) after clear(), since the behaviour of clear() looks different from v1.4.0 to v1.4.1 if you don't also set a background color

@davepagurek davepagurek merged commit c45c5b5 into main Mar 20, 2022
@davepagurek davepagurek deleted the fix/p51.4.1 branch March 20, 2022 12:43
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.

Example sketch looks different in p5.js 1.4.1

2 participants