|
@@ -132,13 +132,16 @@ Object.assign( THREE.EffectComposer.prototype, {
|
|
|
|
|
|
if ( maskActive ) {
|
|
|
|
|
|
- var context = this.renderer.context;
|
|
|
+ var context = this.renderer.getContext();
|
|
|
+ var stencil = this.renderer.state.buffers.stencil;
|
|
|
|
|
|
- context.stencilFunc( context.NOTEQUAL, 1, 0xffffffff );
|
|
|
+ //context.stencilFunc( context.NOTEQUAL, 1, 0xffffffff );
|
|
|
+ stencil.setFunc( context.NOTEQUAL, 1, 0xffffffff );
|
|
|
|
|
|
this.copyPass.render( this.renderer, this.writeBuffer, this.readBuffer, deltaTime );
|
|
|
|
|
|
- context.stencilFunc( context.EQUAL, 1, 0xffffffff );
|
|
|
+ //context.stencilFunc( context.EQUAL, 1, 0xffffffff );
|
|
|
+ stencil.setFunc( context.EQUAL, 1, 0xffffffff );
|
|
|
|
|
|
}
|
|
|
|