Преглед на файлове

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