Quellcode durchsuchen

fixed equiToCube should use hdr when source is hdr

Nicolas Cannasse vor 4 Jahren
Ursprung
Commit
2ccac76c92
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  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;