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

Unbind textures when done with a shader #5923

Merged
merged 1 commit into from Jan 4, 2023

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