Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Unbind textures when done with a shader
  • Loading branch information
davepagurek committed Dec 30, 2022
commit 900f30a2832e94c829e0290b617ca2e7cadf1a6f
5 changes: 3 additions & 2 deletions src/webgl/p5.Shader.js
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,9 @@ p5.Shader.prototype.updateTextures = function() {
};

p5.Shader.prototype.unbindTextures = function() {
// TODO: migrate stuff from material.js here
// - OR - have material.js define this function
for (const uniform of this.samplers) {
this.setUniform(uniform.name, this._renderer._getEmptyTexture());
}
};

p5.Shader.prototype._setMatrixUniforms = function() {
Expand Down