Skip to content

Commit 1dc1a42

Browse files
committed
Fix incorrect handling of depth buffer when stencil buffer was enabled
1 parent 77737b9 commit 1dc1a42

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/renderers/webgl/WebGLTextures.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1580,7 +1580,7 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
15801580

15811581
}
15821582

1583-
} else if ( renderTarget.depthBuffer && ! renderTarget.stencilBuffer ) {
1583+
} else if ( renderTarget.depthBuffer ) {
15841584

15851585
// retrieve the depth attachment types
15861586
const depthTexture = renderTarget.depthTexture;
@@ -1670,7 +1670,6 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
16701670

16711671
}
16721672

1673-
setTexture2D( renderTarget.depthTexture, 0 );
16741673
if ( renderTarget.depthTexture.image.depth != 1 ) {
16751674

16761675
setTexture2DArray( renderTarget.depthTexture, 0 );

0 commit comments

Comments
 (0)