@@ -87,10 +87,10 @@ var OutlinePass = function ( resolution, scene, camera, selectedObjects ) {
8787 var MAX_EDGE_GLOW = 4 ;
8888
8989 this . separableBlurMaterial1 = this . getSeperableBlurMaterial ( MAX_EDGE_THICKNESS ) ;
90- this . separableBlurMaterial1 . uniforms [ "texSize" ] . value = new Vector2 ( resx , resy ) ;
90+ this . separableBlurMaterial1 . uniforms [ "texSize" ] . value . set ( resx , resy ) ;
9191 this . separableBlurMaterial1 . uniforms [ "kernelRadius" ] . value = 1 ;
9292 this . separableBlurMaterial2 = this . getSeperableBlurMaterial ( MAX_EDGE_GLOW ) ;
93- this . separableBlurMaterial2 . uniforms [ "texSize" ] . value = new Vector2 ( Math . round ( resx / 2 ) , Math . round ( resy / 2 ) ) ;
93+ this . separableBlurMaterial2 . uniforms [ "texSize" ] . value . set ( Math . round ( resx / 2 ) , Math . round ( resy / 2 ) ) ;
9494 this . separableBlurMaterial2 . uniforms [ "kernelRadius" ] . value = MAX_EDGE_GLOW ;
9595
9696 // Overlay material
@@ -162,15 +162,15 @@ OutlinePass.prototype = Object.assign( Object.create( Pass.prototype ), {
162162 this . renderTargetMaskDownSampleBuffer . setSize ( resx , resy ) ;
163163 this . renderTargetBlurBuffer1 . setSize ( resx , resy ) ;
164164 this . renderTargetEdgeBuffer1 . setSize ( resx , resy ) ;
165- this . separableBlurMaterial1 . uniforms [ "texSize" ] . value = new Vector2 ( resx , resy ) ;
165+ this . separableBlurMaterial1 . uniforms [ "texSize" ] . value . set ( resx , resy ) ;
166166
167167 resx = Math . round ( resx / 2 ) ;
168168 resy = Math . round ( resy / 2 ) ;
169169
170170 this . renderTargetBlurBuffer2 . setSize ( resx , resy ) ;
171171 this . renderTargetEdgeBuffer2 . setSize ( resx , resy ) ;
172172
173- this . separableBlurMaterial2 . uniforms [ "texSize" ] . value = new Vector2 ( resx , resy ) ;
173+ this . separableBlurMaterial2 . uniforms [ "texSize" ] . value . set ( resx , resy ) ;
174174
175175 } ,
176176
@@ -305,7 +305,7 @@ OutlinePass.prototype = Object.assign( Object.create( Pass.prototype ), {
305305 // Make non selected objects invisible, and draw only the selected objects, by comparing the depth buffer of non selected objects
306306 this . changeVisibilityOfNonSelectedObjects ( false ) ;
307307 this . renderScene . overrideMaterial = this . prepareMaskMaterial ;
308- this . prepareMaskMaterial . uniforms [ "cameraNearFar" ] . value = new Vector2 ( this . renderCamera . near , this . renderCamera . far ) ;
308+ this . prepareMaskMaterial . uniforms [ "cameraNearFar" ] . value . set ( this . renderCamera . near , this . renderCamera . far ) ;
309309 this . prepareMaskMaterial . uniforms [ "depthTexture" ] . value = this . renderTargetDepthBuffer . texture ;
310310 this . prepareMaskMaterial . uniforms [ "textureMatrix" ] . value = this . textureMatrix ;
311311 renderer . setRenderTarget ( this . renderTargetMaskBuffer ) ;
@@ -337,7 +337,7 @@ OutlinePass.prototype = Object.assign( Object.create( Pass.prototype ), {
337337 // 3. Apply Edge Detection Pass
338338 this . fsQuad . material = this . edgeDetectionMaterial ;
339339 this . edgeDetectionMaterial . uniforms [ "maskTexture" ] . value = this . renderTargetMaskDownSampleBuffer . texture ;
340- this . edgeDetectionMaterial . uniforms [ "texSize" ] . value = new Vector2 ( this . renderTargetMaskDownSampleBuffer . width , this . renderTargetMaskDownSampleBuffer . height ) ;
340+ this . edgeDetectionMaterial . uniforms [ "texSize" ] . value . set ( this . renderTargetMaskDownSampleBuffer . width , this . renderTargetMaskDownSampleBuffer . height ) ;
341341 this . edgeDetectionMaterial . uniforms [ "visibleEdgeColor" ] . value = this . tempPulseColor1 ;
342342 this . edgeDetectionMaterial . uniforms [ "hiddenEdgeColor" ] . value = this . tempPulseColor2 ;
343343 renderer . setRenderTarget ( this . renderTargetEdgeBuffer1 ) ;
@@ -410,7 +410,7 @@ OutlinePass.prototype = Object.assign( Object.create( Pass.prototype ), {
410410 uniforms : {
411411 "depthTexture" : { value : null } ,
412412 "cameraNearFar" : { value : new Vector2 ( 0.5 , 0.5 ) } ,
413- "textureMatrix" : { value : new Matrix4 ( ) }
413+ "textureMatrix" : { value : null }
414414 } ,
415415
416416 vertexShader : [
0 commit comments