Skip to content

Commit e9fd284

Browse files
committed
Reset mask before clearing stencil
1 parent 1250397 commit e9fd284

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/renderers/WebGLRenderer.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -629,7 +629,12 @@ class WebGLRenderer {
629629
}
630630

631631
if ( depth ) bits |= _gl.DEPTH_BUFFER_BIT;
632-
if ( stencil ) bits |= _gl.STENCIL_BUFFER_BIT;
632+
if ( stencil ) {
633+
634+
bits |= _gl.STENCIL_BUFFER_BIT;
635+
this.state.stencilBuffer.setMask( 0xff );
636+
637+
}
633638

634639
_gl.clear( bits );
635640

0 commit comments

Comments
 (0)