瀏覽代碼

Fixed unbind multirendertarget

When generating mipmaps with MRT, `forTextureDataUpdate` in `_bindTextureDirectly` should be true
Benjamin Guignabert 5 年之前
父節點
當前提交
cc7f142a3c
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/Engines/Extensions/engine.multiRender.ts

+ 1 - 1
src/Engines/Extensions/engine.multiRender.ts

@@ -76,7 +76,7 @@ ThinEngine.prototype.unBindMultiColorAttachmentFramebuffer = function(textures:
     for (var i = 0; i < textures.length; i++) {
         var texture = textures[i];
         if (texture.generateMipMaps && !disableGenerateMipMaps && !texture.isCube) {
-            this._bindTextureDirectly(gl.TEXTURE_2D, texture);
+            this._bindTextureDirectly(gl.TEXTURE_2D, texture, true);
             gl.generateMipmap(gl.TEXTURE_2D);
             this._bindTextureDirectly(gl.TEXTURE_2D, null);
         }