فهرست منبع

WebGLRenderTarget: Honor scissor properties in `copy()`. (#25805)

Michael Herzog 2 سال پیش
والد
کامیت
52d0b6d6a9
2فایلهای تغییر یافته به همراه6 افزوده شده و 1 حذف شده
  1. 3 1
      src/renderers/WebGLMultipleRenderTargets.js
  2. 3 0
      src/renderers/WebGLRenderTarget.js

+ 3 - 1
src/renderers/WebGLMultipleRenderTargets.js

@@ -56,8 +56,10 @@ class WebGLMultipleRenderTargets extends WebGLRenderTarget {
 		this.height = source.height;
 		this.height = source.height;
 		this.depth = source.depth;
 		this.depth = source.depth;
 
 
-		this.viewport.copy( source.viewport );
 		this.scissor.copy( source.scissor );
 		this.scissor.copy( source.scissor );
+		this.scissorTest = source.scissorTest;
+
+		this.viewport.copy( source.viewport );
 
 
 		this.depthBuffer = source.depthBuffer;
 		this.depthBuffer = source.depthBuffer;
 		this.stencilBuffer = source.stencilBuffer;
 		this.stencilBuffer = source.stencilBuffer;

+ 3 - 0
src/renderers/WebGLRenderTarget.js

@@ -87,6 +87,9 @@ class WebGLRenderTarget extends EventDispatcher {
 		this.height = source.height;
 		this.height = source.height;
 		this.depth = source.depth;
 		this.depth = source.depth;
 
 
+		this.scissor.copy( source.scissor );
+		this.scissorTest = source.scissorTest;
+
 		this.viewport.copy( source.viewport );
 		this.viewport.copy( source.viewport );
 
 
 		this.texture = source.texture.clone();
 		this.texture = source.texture.clone();