Przeglądaj źródła

Fix env map Euler rotation (#27785)

WestLangley 1 rok temu
rodzic
commit
18a5375fff

+ 3 - 2
src/renderers/webgl/WebGLBackground.js

@@ -116,8 +116,9 @@ function WebGLBackground( renderer, cubemaps, cubeuvmaps, state, objects, alpha,
 
 			if ( background.isCubeTexture && background.isRenderTargetTexture === false ) {
 
-				// environment maps which are no cube render targets or PMREMs follow a different px/nx convention
-				_e1.x *= - 1;
+				// environment maps which are not cube render targets or PMREMs follow a different convention
+				_e1.y *= - 1;
+				_e1.z *= - 1;
 
 			}
 

+ 3 - 2
src/renderers/webgl/WebGLMaterials.js

@@ -230,8 +230,9 @@ function WebGLMaterials( renderer, properties ) {
 
 			if ( envMap.isCubeTexture && envMap.isRenderTargetTexture === false ) {
 
-				// environment maps which are no cube render targets or PMREMs follow a different px/nx convention
-				_e1.x *= - 1;
+				// environment maps which are not cube render targets or PMREMs follow a different convention
+				_e1.y *= - 1;
+				_e1.z *= - 1;
 
 			}