瀏覽代碼

Fix format for env

ShiroSmith 4 年之前
父節點
當前提交
2f9a5ded3a
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      h3d/scene/pbr/Environment.hx

+ 1 - 1
h3d/scene/pbr/Environment.hx

@@ -273,7 +273,7 @@ class Environment {
 
 		if( source.width != source.height * 2 )
 			throw "Unrecognized environment map format";
-		var env = new h3d.mat.Texture(source.height, source.height, [Cube, Target], source.format);
+		var env = new h3d.mat.Texture(source.height, source.height, [Cube, Target], hxd.Pixels.isFloatFormat(source.format) ? RGBA32F : RGBA );
 		var pass = new h3d.pass.ScreenFx(new PanoramaToCube());
 		var engine = h3d.Engine.getCurrent();
 		pass.shader.texture = source;