Browse Source

fix envmap loading error

trethaller 4 years ago
parent
commit
a793507ffc
1 changed files with 1 additions and 1 deletions
  1. 1 1
      hide/Renderer.hx

+ 1 - 1
hide/Renderer.hx

@@ -97,7 +97,7 @@ class PbrSetup extends h3d.mat.PbrMaterialSetup {
 		var path = ide.getPath(scene.config.get("scene.environment"));
 		var data = sys.io.File.getBytes(path);
 		var pix = hxd.res.Any.fromBytes(path, data).toImage().getPixels();
-		var t = h3d.mat.Texture.fromPixels(pix); // sync
+		var t = h3d.mat.Texture.fromPixels(pix, h3d.mat.Texture.nativeFormat); // sync
 		t.setName(ide.makeRelative(path));
 		return t;
 	}