Browse Source

Merge pull request #4675 from NicolasBuecher/fix_hdrCubeTexture

Don't generate mipmaps for HDRCubeTexture if texture float filtering is disabled
David Catuhe 7 years ago
parent
commit
87f777fff3
2 changed files with 4 additions and 0 deletions
  1. 1 0
      dist/preview release/what's new.md
  2. 3 0
      src/Engine/babylon.engine.ts

+ 1 - 0
dist/preview release/what's new.md

@@ -107,6 +107,7 @@
 - Parse geometry when load binary mesh ([SinhNQ](https://github.com/quocsinh))
 - Removing observers during observable notify should not skip over valid observers ([TrevorDev](https://github.com/TrevorDev))
 - Initializing gamepadManager should register the gamepad update events ([TrevorDev](https://github.com/TrevorDev))
+- Do not generate mipmaps for HDRCubeTexture if OES_texture_float_linear isn't supported ([PeapBoy](https://github.com/NicolasBuecher))
 
 ### Core Engine
 

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