提交 3695450d 编写于 作者: M Mr.doob 提交者: GitHub

Merge pull request #10159 from handwritingio/renderpass-cleardepth

Add clearDepth attribute to RenderPass
......@@ -15,6 +15,7 @@ THREE.RenderPass = function ( scene, camera, overrideMaterial, clearColor, clear
this.clearAlpha = ( clearAlpha !== undefined ) ? clearAlpha : 0;
this.clear = true;
this.clearDepth = false;
this.needsSwap = false;
};
......@@ -41,6 +42,12 @@ THREE.RenderPass.prototype = Object.assign( Object.create( THREE.Pass.prototype
}
if ( this.clearDepth ) {
renderer.clearDepth();
}
renderer.render( this.scene, this.camera, this.renderToScreen ? null : readBuffer, this.clear );
if ( this.clearColor ) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册