فهرست منبع

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.clear = true;
+		this.needsSwap = false;
 
 		this.camera = camera;
 		this.scene = scene;
@@ -229,13 +230,9 @@ class SSAOPass extends Pass {
 
 			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.blending = CustomBlending;
-				this.renderPass( renderer, this.copyMaterial, this.renderToScreen ? null : writeBuffer );
+				this.renderPass( renderer, this.copyMaterial, this.renderToScreen ? null : readBuffer );
 
 				break;