Browse Source

Merge pull request #4717 from sebavan/master

Fix Creating .env from none HDR source
sebavan 7 years ago
parent
commit
51f7d42c73

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

@@ -126,6 +126,7 @@
 - Fixed support for R and RG texture formats ([sebavan](http://www.github.com/sebavan))
 - Fixed `updatable` parameter setting in the SPS ([jerome](https://github.com/jbousquie))
 - Angular and linear velocity were using the wrong method to copy values to the physics engine ([RaananW](https://github.com/RaananW))
+- Fixed env texture generation in Byte Mode ([sebavan](http://www.github.com/sebavan))
 
 ### Viewer
 

+ 4 - 0
src/Tools/babylon.environmentTextureTools.ts

@@ -141,6 +141,10 @@ module BABYLON {
                 return Promise.reject("Env texture can only be created when the engine is created with the premultipliedAlpha option set to false.");
             }
 
+            if (texture.textureType === Engine.TEXTURETYPE_UNSIGNED_INT) {
+                return Promise.reject("The cube texture should allow HDR (Full Float or Half Float).");
+            }
+
             let canvas = engine.getRenderingCanvas();
             if (!canvas) {
                 return Promise.reject("Env texture can only be created when the engine is associated to a canvas.");

BIN
tests/validation/ReferenceImages/dds.png


+ 1 - 1
tests/validation/config.json

@@ -483,7 +483,7 @@
     },
     {
       "title": "DDS",
-      "playgroundId": "#ZI77S7#2",
+      "playgroundId": "#ZI77S7#3",
       "referenceImage": "dds.png"
     }
   ]