浏览代码

fix: Move check from HDRCubeTexture to Engine

Nicolas 7 年之前
父节点
当前提交
1fd8bceb3c
共有 2 个文件被更改,包括 4 次插入1 次删除
  1. 3 0
      src/Engine/babylon.engine.ts
  2. 1 1
      src/Materials/Textures/babylon.hdrCubeTexture.ts

+ 3 - 0
src/Engine/babylon.engine.ts

@@ -5912,6 +5912,9 @@
                 }
                 else {
                     texture.generateMipMaps = !noMipmap;
+                    if (type === Engine.TEXTURETYPE_FLOAT && !this._caps.textureFloatLinearFiltering) {
+                        texture.generateMipMaps = false;
+                    }
                     this.updateRawCubeTexture(texture, faceDataArrays, format, type, invertY);
                 }
 

+ 1 - 1
src/Materials/Textures/babylon.hdrCubeTexture.ts

@@ -118,7 +118,7 @@ module BABYLON {
             this._onError = onError;
             this.gammaSpace = gammaSpace;
 
-            this._noMipmap = noMipmap || !scene.getEngine()._caps.textureFloatLinearFiltering;
+            this._noMipmap = noMipmap;
             this._size = size;
 
             this._texture = this._getFromCache(url, this._noMipmap);