File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -301,15 +301,15 @@ class UnderWater extends Effect {
301301 if ( this . _texture === null ) {
302302 this . envMaterial . uniforms [ 'envTexture' ] . value = null ;
303303 this . envMaterial . defines [ 'USE_TEXTURING' ] = false ;
304+ } else {
305+ this . _texture . wrapS = THREE . RepeatWrapping ;
306+ this . _texture . wrapT = THREE . RepeatWrapping ;
304307
305- return ;
308+ this . envMaterial . uniforms [ 'envTexture' ] . value = this . _texture ;
309+ this . envMaterial . defines [ 'USE_TEXTURING' ] = true ;
306310 }
307311
308- this . _texture . wrapS = THREE . RepeatWrapping ;
309- this . _texture . wrapT = THREE . RepeatWrapping ;
310-
311- this . envMaterial . uniforms [ 'envTexture' ] . value = this . _texture ;
312- this . envMaterial . defines [ 'USE_TEXTURING' ] = true ;
312+ this . envMaterial . needsUpdate = true ;
313313 }
314314
315315 renderEnvMap ( renderer : THREE . WebGLRenderer , lightCamera : THREE . Camera ) {
You can’t perform that action at this time.
0 commit comments