瀏覽代碼

Merge branch 'master' of https://github.com/sebavan/Babylon.js

sebastien 7 年之前
父節點
當前提交
045c59dd7a
共有 2 個文件被更改,包括 5 次插入0 次删除
  1. 1 0
      dist/preview release/what's new.md
  2. 4 0
      src/Tools/babylon.environmentTextureTools.ts

+ 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.");