소스 검색

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);
         }