diff --git a/package.json b/package.json index 14e025a..931adf8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pixi.js", - "version": "4.3.4", + "version": "4.3.5", "description": "Pixi.js is a fast lightweight 2D library that works across all devices.", "author": "Mat Groves", "contributors": [ diff --git a/package.json b/package.json index 14e025a..931adf8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pixi.js", - "version": "4.3.4", + "version": "4.3.5", "description": "Pixi.js is a fast lightweight 2D library that works across all devices.", "author": "Mat Groves", "contributors": [ diff --git a/src/core/renderers/webgl/managers/FilterManager.js b/src/core/renderers/webgl/managers/FilterManager.js index dd7419c..39e4cc0 100644 --- a/src/core/renderers/webgl/managers/FilterManager.js +++ b/src/core/renderers/webgl/managers/FilterManager.js @@ -257,20 +257,22 @@ renderer.bindShader(shader); + // free unit 0 for us, doesn't matter what was there + // don't try to restore it, because syncUniforms can upload it to another slot + // and it'll be a problem + const tex = this.renderer.emptyTextures[0]; + + this.renderer.boundTextures[0] = tex; // this syncs the pixi filters uniforms with glsl uniforms this.syncUniforms(shader, filter); renderer.state.setBlendMode(filter.blendMode); - // temporary bypass cache.. - const tex = this.renderer.boundTextures[0]; - gl.activeTexture(gl.TEXTURE0); gl.bindTexture(gl.TEXTURE_2D, input.texture.texture); this.quad.vao.draw(this.renderer.gl.TRIANGLES, 6, 0); - // restore cache. gl.bindTexture(gl.TEXTURE_2D, tex._glTextures[this.renderer.CONTEXT_UID].texture); }