|
@@ -197,7 +197,7 @@ THREE.SSAOPass.prototype = Object.assign( Object.create( THREE.Pass.prototype ),
|
|
|
|
|
|
this.copyMaterial.uniforms[ 'tDiffuse' ].value = this.ssaoRenderTarget.texture;
|
|
|
this.copyMaterial.blending = THREE.NoBlending;
|
|
|
- this.renderPass( renderer, this.copyMaterial, null );
|
|
|
+ this.renderPass( renderer, this.copyMaterial, this.renderToScreen ? null : writeBuffer );
|
|
|
|
|
|
break;
|
|
|
|
|
@@ -205,7 +205,7 @@ THREE.SSAOPass.prototype = Object.assign( Object.create( THREE.Pass.prototype ),
|
|
|
|
|
|
this.copyMaterial.uniforms[ 'tDiffuse' ].value = this.blurRenderTarget.texture;
|
|
|
this.copyMaterial.blending = THREE.NoBlending;
|
|
|
- this.renderPass( renderer, this.copyMaterial, null );
|
|
|
+ this.renderPass( renderer, this.copyMaterial, this.renderToScreen ? null : writeBuffer );
|
|
|
|
|
|
break;
|
|
|
|
|
@@ -213,13 +213,13 @@ THREE.SSAOPass.prototype = Object.assign( Object.create( THREE.Pass.prototype ),
|
|
|
|
|
|
this.copyMaterial.uniforms[ 'tDiffuse' ].value = this.beautyRenderTarget.texture;
|
|
|
this.copyMaterial.blending = THREE.NoBlending;
|
|
|
- this.renderPass( renderer, this.copyMaterial, null );
|
|
|
+ this.renderPass( renderer, this.copyMaterial, this.renderToScreen ? null : writeBuffer );
|
|
|
|
|
|
break;
|
|
|
|
|
|
case THREE.SSAOPass.OUTPUT.Depth:
|
|
|
|
|
|
- this.renderPass( renderer, this.depthRenderMaterial, null );
|
|
|
+ this.renderPass( renderer, this.depthRenderMaterial, this.renderToScreen ? null : writeBuffer );
|
|
|
|
|
|
break;
|
|
|
|
|
@@ -227,7 +227,7 @@ THREE.SSAOPass.prototype = Object.assign( Object.create( THREE.Pass.prototype ),
|
|
|
|
|
|
this.copyMaterial.uniforms[ 'tDiffuse' ].value = this.normalRenderTarget.texture;
|
|
|
this.copyMaterial.blending = THREE.NoBlending;
|
|
|
- this.renderPass( renderer, this.copyMaterial, null );
|
|
|
+ this.renderPass( renderer, this.copyMaterial, this.renderToScreen ? null : writeBuffer );
|
|
|
|
|
|
break;
|
|
|
|
|
@@ -235,7 +235,7 @@ THREE.SSAOPass.prototype = Object.assign( Object.create( THREE.Pass.prototype ),
|
|
|
|
|
|
this.copyMaterial.uniforms[ 'tDiffuse' ].value = this.beautyRenderTarget.texture;
|
|
|
this.copyMaterial.blending = THREE.NoBlending;
|
|
|
- this.renderPass( renderer, this.copyMaterial, null );
|
|
|
+ this.renderPass( renderer, this.copyMaterial, this.renderToScreen ? null : writeBuffer );
|
|
|
|
|
|
this.copyMaterial.uniforms[ 'tDiffuse' ].value = this.blurRenderTarget.texture;
|
|
|
this.copyMaterial.blending = THREE.CustomBlending;
|