Skip to content

Commit

Permalink
Reset mask before clearing stencil (mrdoob#26737)
Browse files Browse the repository at this point in the history
  • Loading branch information
OndrejSpanel authored Oct 4, 2023
1 parent a2050bc commit a238892
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/renderers/WebGLRenderer.js
Original file line number Diff line number Diff line change
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.buffers.stencil.setMask( 0xffffffff );

}

_gl.clear( bits );

Expand Down

0 comments on commit a238892

Please sign in to comment.