Prechádzať zdrojové kódy

Fix resize issue in OutlinePass (#21436)

Julianouyang 4 rokov pred
rodič
commit
976404aa28

+ 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 ) {
 	setSize: function ( width, height ) {
 
 
 		this.renderTargetMaskBuffer.setSize( width, height );
 		this.renderTargetMaskBuffer.setSize( width, height );
+		this.renderTargetDepthBuffer.setSize( width, height );
 
 
 		var resx = Math.round( width / this.downSampleRatio );
 		var resx = Math.round( width / this.downSampleRatio );
 		var resy = Math.round( height / 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 ) {
 	setSize: function ( width, height ) {
 
 
 		this.renderTargetMaskBuffer.setSize( width, height );
 		this.renderTargetMaskBuffer.setSize( width, height );
+		this.renderTargetDepthBuffer.setSize( width, height );
 
 
 		var resx = Math.round( width / this.downSampleRatio );
 		var resx = Math.round( width / this.downSampleRatio );
 		var resy = Math.round( height / this.downSampleRatio );
 		var resy = Math.round( height / this.downSampleRatio );