Skip to content

Commit

Permalink
Fix env map Euler rotation
Browse files Browse the repository at this point in the history
  • Loading branch information
WestLangley committed Feb 21, 2024
1 parent 217453f commit 618bf21
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/renderers/webgl/WebGLBackground.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

}

Expand Down
5 changes: 3 additions & 2 deletions src/renderers/webgl/WebGLMaterials.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

}

Expand Down

0 comments on commit 618bf21

Please sign in to comment.