Browse Source

Restored generate mip maps in createRenderTargetTexture

George Corney (STR Limited) 8 years ago
parent
commit
f428a4f324
1 changed files with 4 additions and 0 deletions
  1. 4 0
      src/babylon.engine.ts

+ 4 - 0
src/babylon.engine.ts

@@ -2349,6 +2349,10 @@
             }
             gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, texture, 0);
 
+            if (generateMipMaps) {
+                this._gl.generateMipmap(this._gl.TEXTURE_2D);
+            }
+
             // Unbind
             this._bindTextureDirectly(gl.TEXTURE_2D, null);
             gl.bindRenderbuffer(gl.RENDERBUFFER, null);