Skip to content

Commit

Permalink
Reset mask before clearing stencil
Browse files Browse the repository at this point in the history
  • Loading branch information
OndrejSpanel committed Sep 12, 2023
1 parent 1250397 commit e9fd284
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/renderers/WebGLRenderer.js
Expand Up @@ -629,7 +629,12 @@ class WebGLRenderer {
}

if ( depth ) bits |= _gl.DEPTH_BUFFER_BIT;
if ( stencil ) bits |= _gl.STENCIL_BUFFER_BIT;
if ( stencil ) {

bits |= _gl.STENCIL_BUFFER_BIT;
this.state.stencilBuffer.setMask( 0xff );

}

_gl.clear( bits );

Expand Down

0 comments on commit e9fd284

Please sign in to comment.