diff --git a/examples/jsm/renderers/webgl/WebGLBackend.js b/examples/jsm/renderers/webgl/WebGLBackend.js index f998fe5f809906..ca9ee5e7ba065b 100644 --- a/examples/jsm/renderers/webgl/WebGLBackend.js +++ b/examples/jsm/renderers/webgl/WebGLBackend.js @@ -550,9 +550,7 @@ class WebGLBackend extends Backend { generateMipmaps( texture ) { const { gl } = this; - const { glTextureType } = this.get( texture ); - - this._bindTexture( texture ); + const { glTextureType } = this._bindTexture( texture ); gl.generateMipmap( glTextureType ); @@ -762,12 +760,8 @@ class WebGLBackend extends Backend { } else if ( binding.isSampledTexture ) { - const { textureGPU, glTextureType } = this.get( binding.texture ); - this.set( binding, { - index: textureIndex ++, - textureGPU, - glTextureType + index: textureIndex ++ } ); } @@ -942,6 +936,8 @@ class WebGLBackend extends Backend { } + return textureData; + } }