소스 검색

Fix resize issue in OutlinePass (#21436)

Julianouyang 4 년 전
부모
커밋
976404aa28
2개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      examples/js/postprocessing/OutlinePass.js
  2. 1 0
      examples/jsm/postprocessing/OutlinePass.js

+ 1 - 0
examples/js/postprocessing/OutlinePass.js

@@ -134,6 +134,7 @@ THREE.OutlinePass.prototype = Object.assign( Object.create( THREE.Pass.prototype
 	setSize: function ( width, height ) {
 
 		this.renderTargetMaskBuffer.setSize( width, height );
+		this.renderTargetDepthBuffer.setSize( width, height );
 
 		var resx = Math.round( width / this.downSampleRatio );
 		var resy = Math.round( height / this.downSampleRatio );

+ 1 - 0
examples/jsm/postprocessing/OutlinePass.js

@@ -154,6 +154,7 @@ OutlinePass.prototype = Object.assign( Object.create( Pass.prototype ), {
 	setSize: function ( width, height ) {
 
 		this.renderTargetMaskBuffer.setSize( width, height );
+		this.renderTargetDepthBuffer.setSize( width, height );
 
 		var resx = Math.round( width / this.downSampleRatio );
 		var resy = Math.round( height / this.downSampleRatio );