Browse Source

[WebGLMultipleRenderTargets.prototype.copy] Fix misprint: copy viewport/scissor from source (#25803)

Kirill Osipov 2 năm trước cách đây
mục cha
commit
27de13eb1c
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      src/renderers/WebGLMultipleRenderTargets.js

+ 2 - 2
src/renderers/WebGLMultipleRenderTargets.js

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