diff --git a/src/renderers/webgl/WebGLState.js b/src/renderers/webgl/WebGLState.js index 37a0a4f12542ce..476f477c8cd7c6 100644 --- a/src/renderers/webgl/WebGLState.js +++ b/src/renderers/webgl/WebGLState.js @@ -898,7 +898,7 @@ function WebGLState( gl, extensions, capabilities ) { gl.clearDepth( 1 ); gl.stencilMask( 0xffffffff ); - gl.stencilFunc( gl.ALWAYS, 0, 1 ); + gl.stencilFunc( gl.ALWAYS, 0, 0xffffffff ); gl.stencilOp( gl.KEEP, gl.KEEP, gl.KEEP ); gl.clearStencil( 0 ); @@ -907,6 +907,15 @@ function WebGLState( gl, extensions, capabilities ) { gl.polygonOffset( 0, 0 ); + gl.activeTexture( gl.TEXTURE0 ); + + gl.useProgram( null ); + + gl.lineWidth( 1 ); + + gl.scissor( 0, 0, gl.canvas.width, gl.canvas.height ); + gl.viewport( 0, 0, gl.canvas.width, gl.canvas.height ); + // reset internals enabledCapabilities = {};