|
@@ -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;
|
|
|
|