Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mbredif committed Mar 1, 2024
1 parent b202992 commit 452d587
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build/three.js
Original file line number Diff line number Diff line change
Expand Up @@ -15733,7 +15733,7 @@
_gl.framebufferRenderbuffer(_gl.FRAMEBUFFER, _gl.DEPTH_STENCIL_ATTACHMENT, _gl.RENDERBUFFER, renderbuffer);
} else {
// Use the first texture for MRT so far
const texture = renderTarget.isWebGLMultipleRenderTargets === true ? renderTarget.texture[0] : renderTarget.texture;
const texture = renderTarget.textures[0];
const glFormat = utils.convert(texture.format);
const glType = utils.convert(texture.type);
const glInternalFormat = getInternalFormat(texture.internalFormat, glFormat, glType);
Expand Down
4 changes: 2 additions & 2 deletions src/renderers/WebGLCubeRenderTarget.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,9 @@ class WebGLCubeRenderTarget extends WebGLRenderTarget {

const currentRenderTarget = renderer.getRenderTarget();

for ( let f = 0; f < 6; f ++ ) {
for ( let i = 0; i < 6; i ++ ) {

renderer.setRenderTarget( this, f );
renderer.setRenderTarget( this, i );

renderer.clear( color, depth, stencil );

Expand Down
2 changes: 1 addition & 1 deletion src/textures/CubeTexture.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class CubeTexture extends Texture {

// three.js uses a right-handed coordinate system. So environment maps used in three.js appear to have px and nx swapped
// and the flag _needsFlipEnvMap controls this conversion. The flip is not required (and thus _needsFlipEnvMap is set to false)
// when using a cube texture in WebGLCubeRenderTarget.textures.
// when using WebGLCubeRenderTarget.texture as a cube texture.

this._needsFlipEnvMap = true;

Expand Down

0 comments on commit 452d587

Please sign in to comment.