未验证 提交 1b184ae0 编写于 作者: M mrdoob 提交者: GitHub

WebGLRenderTarget: Clone depthTexture in copy(). (#23462)

上级 0138219a
......@@ -34,6 +34,7 @@ class WebGLRenderTarget extends EventDispatcher {
this.depthBuffer = options.depthBuffer !== undefined ? options.depthBuffer : true;
this.stencilBuffer = options.stencilBuffer !== undefined ? options.stencilBuffer : false;
this.depthTexture = options.depthTexture !== undefined ? options.depthTexture : null;
}
......@@ -93,7 +94,8 @@ class WebGLRenderTarget extends EventDispatcher {
this.depthBuffer = source.depthBuffer;
this.stencilBuffer = source.stencilBuffer;
this.depthTexture = source.depthTexture;
if ( source.depthTexture !== null ) this.depthTexture = source.depthTexture.clone();
return this;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册