Skip to content
Open
Changes from 1 commit
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
Prev Previous commit
Initialized gl and cleared set after using
  • Loading branch information
Forchapeatl authored Sep 3, 2024
commit e81764e765132286bd0ea5024dc8cff50ec21595
2 changes: 2 additions & 0 deletions src/webgl/p5.Shader.js
Original file line number Diff line number Diff line change
Expand Up @@ -574,12 +574,14 @@ p5.Shader = class {
}

unbindTextures() {
const gl = this._renderer.GL;
for (const uniform of this.samplers) {
const textureUnit = gl.TEXTURE0 + uniform.samplerIndex;
if (!this.previousBindings.has(textureUnit)){
this.setUniform(uniform.name, this._renderer._getEmptyTexture());
}
}
this.previousBindings.clear();
}

_setMatrixUniforms() {
Expand Down