浏览代码

fixed equiToCube should use hdr when source is hdr

Nicolas Cannasse 4 年之前
父节点
当前提交
2ccac76c92
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      h3d/scene/pbr/Environment.hx

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

@@ -268,7 +268,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]);
+		var env = new h3d.mat.Texture(source.height, source.height, [Cube, Target], source.format);
 		var pass = new h3d.pass.ScreenFx(new PanoramaToCube());
 		var engine = h3d.Engine.getCurrent();
 		pass.shader.texture = source;