Explorar o código

Merge pull request #15838 from Mugen87/dev26

RenderPass: Fix usage in context of WebGLDeferredRenderer
Mr.doob %!s(int64=6) %!d(string=hai) anos
pai
achega
474b996230
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      examples/js/postprocessing/RenderPass.js

+ 3 - 1
examples/js/postprocessing/RenderPass.js

@@ -49,7 +49,9 @@ THREE.RenderPass.prototype = Object.assign( Object.create( THREE.Pass.prototype
 		}
 		}
 
 
 		renderer.setRenderTarget( this.renderToScreen ? null : readBuffer );
 		renderer.setRenderTarget( this.renderToScreen ? null : readBuffer );
-		if ( this.clear ) renderer.clear();
+
+		// TODO: Avoid using autoClear properties, see https://github.com/mrdoob/three.js/pull/15571#issuecomment-465669600
+		if ( this.clear ) renderer.clear( renderer.autoClearColor, renderer.autoClearDepth, renderer.autoClearStencil );
 		renderer.render( this.scene, this.camera );
 		renderer.render( this.scene, this.camera );
 
 
 		if ( this.clearColor ) {
 		if ( this.clearColor ) {