Skip to content

Conversation

@davepagurek
Copy link
Contributor

@davepagurek davepagurek commented Dec 30, 2022

Resolves #5921

Changes:

  • Implements the unbindTextures method on p5.Shader so that the browser doesn't think we're still reading a texture when the shader is no longer in use

Screenshots of the change:

When rendering to a framebuffer, then using that as a texture on a plane, before, the browser would not render fills due to a perceived dependency cycle:

image

After, fills work!

image

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

PR Checklist

  • npm run lint passes
  • [Inline documentation] is included / updated
  • [Unit tests] are included / updated

@Qianqianye Qianqianye merged commit d3fb62b into processing:main Jan 4, 2023
@davepagurek davepagurek deleted the fix/unbind-textures branch January 4, 2023 01:31
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.

Default fill shader texture stays bound even when not used

2 participants