Fix cubemap sky map rendering

Fix an issue with cubemap sky map rendering
This commit is contained in:
tverona1
2019-11-23 14:31:31 -08:00
parent 1ccd619b49
commit 2fd091667b
3 changed files with 17 additions and 13 deletions
+1 -3
View File
@@ -157,7 +157,7 @@ namespace QuestAppLauncher
}
// Read the image
var result = await AppProcessor.LoadRawImageAsync(MakeAbsoluteSkymapPath(skyboxPath), MaxPixels);
var result = await AppProcessor.LoadRawImageAsync(MakeAbsoluteSkymapPath(skyboxPath), MaxPixels, true);
var image = result.Item1;
var imageWidth = result.Item2;
var imageHeight = result.Item3;
@@ -191,7 +191,6 @@ namespace QuestAppLauncher
Debug.LogFormat("Setting horizontal-cross cubemap skybox");
destroyTexture = true;
material = new Material(Shader.Find("skybox/cube"));
material.SetFloat("_RotationX", 180);
material.SetTexture("_Tex", CubemapFromHorizCrossTexture2D(texture));
}
else if (6 * texture.height == texture.width)
@@ -202,7 +201,6 @@ namespace QuestAppLauncher
Debug.LogFormat("Setting horizontal cubemap skybox");
destroyTexture = true;
material = new Material(Shader.Find("skybox/cube"));
material.SetFloat("_RotationX", 180);
material.SetTexture("_Tex", CubemapFromHorizTexture2D(texture));
}
else