浏览代码

SSAOPass: Remove one copy pass. (#28744)

Michael Herzog 1 年之前
父节点
当前提交
4d479c267f
共有 1 个文件被更改,包括 2 次插入5 次删除
  1. 2 5
      examples/jsm/postprocessing/SSAOPass.js

+ 2 - 5
examples/jsm/postprocessing/SSAOPass.js

@@ -39,6 +39,7 @@ class SSAOPass extends Pass {
 		this.height = ( height !== undefined ) ? height : 512;
 		this.height = ( height !== undefined ) ? height : 512;
 
 
 		this.clear = true;
 		this.clear = true;
+		this.needsSwap = false;
 
 
 		this.camera = camera;
 		this.camera = camera;
 		this.scene = scene;
 		this.scene = scene;
@@ -229,13 +230,9 @@ class SSAOPass extends Pass {
 
 
 			case SSAOPass.OUTPUT.Default:
 			case SSAOPass.OUTPUT.Default:
 
 
-				this.copyMaterial.uniforms[ 'tDiffuse' ].value = readBuffer.texture;
-				this.copyMaterial.blending = NoBlending;
-				this.renderPass( renderer, this.copyMaterial, this.renderToScreen ? null : writeBuffer );
-
 				this.copyMaterial.uniforms[ 'tDiffuse' ].value = this.blurRenderTarget.texture;
 				this.copyMaterial.uniforms[ 'tDiffuse' ].value = this.blurRenderTarget.texture;
 				this.copyMaterial.blending = CustomBlending;
 				this.copyMaterial.blending = CustomBlending;
-				this.renderPass( renderer, this.copyMaterial, this.renderToScreen ? null : writeBuffer );
+				this.renderPass( renderer, this.copyMaterial, this.renderToScreen ? null : readBuffer );
 
 
 				break;
 				break;