Buggy code:
if ( ( sceneLight instanceof DirectionalLight ) && ( ( ( DirectionalLight ) ( sceneLight ) ) . isShadowCascade ( ) ) ) { DirectionalLight dirLight = ( ( DirectionalLight ) ( sceneLight ) ) ; for ( int n = 0 ; n < ( dirLight . getShadowCascadeCount ( ) ) ; n ++ ) { VirtualLight virtualLight ; List < VirtualLight > shadowCascadeArray = dirLight . getShadowCascadeArray ( ) ; if ( ( ( shadowCascadeArray . size ( ) ) <= n ) || ( ( shadowCascadeArray . get ( n ) ) == null ) ) { virtualLight = createVirtualLight ( dirLight , n ) ; virtualLight . setOriginalCamera ( camera ) ; Gyroscope gyro = new Gyroscope ( ) ; gyro . setPosition ( dirLight . getShadowCascadeOffset ( ) ) ; gyro . add ( virtualLight ) ; gyro . add ( virtualLight . getTarget ( ) ) ; camera . add ( gyro ) ; shadowCascadeArray . add ( n , virtualLight ) ; Log . debug ( "Shadowmap<seq2seq4repair_space>plugin:<seq2seq4repair_space>Created<seq2seq4repair_space>virtualLight" ) ; } else { virtualLight = ( ( VirtualLight ) ( shadowCascadeArray . get ( n ) ) ) ; } updateVirtualLight ( dirLight , n ) ; lights . add ( virtualLight ) ; } } else { lights . add ( sceneLight ) ; } } for ( int i = 0 , il = lights . size ( ) ; i < il ; i ++ ) { ShadowLight light = ( ( ShadowLight ) ( lights . get ( i ) ) ) ; if ( ( light . getShadowMap ( ) ) == null ) { RenderTargetTexture map = new RenderTargetTexture ( light . getShadowMapWidth ( ) , light . getShadowMapHeight ( ) ) ; map . setMinFilter ( NEAREST ) ; map . setMagFilter ( TextureMagFilter . NEAREST ) ; map . setFormat ( RGBA ) ; light . setShadowMap ( map ) ; light . setShadowMapSize ( new thothbot . parallax . core . shared . math . Vector2 ( light . getShadowMapWidth ( ) , light . getShadowMapHeight ( ) ) ) ; light . setShadowMatrix ( new Matrix4 ( ) ) ; } if ( ( light . getShadowCamera ( ) ) == null ) { if ( light instanceof SpotLight ) { light . setShadowCamera ( new thothbot . parallax . core . shared . cameras . PerspectiveCamera ( ( ( SpotLight ) ( light ) ) . getShadowCameraFov ( ) , ( ( light . getShadowMapWidth ( ) ) // ( light . getShadowMapHeight ( ) ) ) , light . getShadowCameraNear ( ) , light . getShadowCameraFar ( ) ) ) ; } else if ( light instanceof DirectionalLight ) { light . setShadowCamera ( new thothbot . parallax . core . shared . cameras . OrthographicCamera ( ( ( DirectionalLight ) ( light ) ) . getShadowCameraLeft ( ) , ( ( DirectionalLight ) ( light ) ) . getShadowCameraRight ( ) , ( ( DirectionalLight ) ( light ) ) . getShadowCameraTop ( ) , ( ( DirectionalLight ) ( light ) ) . getShadowCameraBottom ( ) , light . getShadowCameraNear ( ) , light . getShadowCameraFar ( ) ) ) ; } else { Log . error ( ( "Shadowmap<seq2seq4repair_space>plugin:<seq2seq4repair_space>Unsupported<seq2seq4repair_space>light<seq2seq4repair_space>class<seq2seq4repair_space>for<seq2seq4repair_space>shadow:<seq2seq4repair_space>" + ( light . getClass ( ) . getName ( ) ) ) ) ; continue ; } getScene ( ) . add ( light . getShadowCamera ( ) ) ; if ( getRenderer ( ) . isAutoUpdateScene ( ) ) getScene ( ) . updateMatrixWorld ( false ) ; } if ( ( light . isShadowCameraVisible ( ) ) && ( ( light . getCameraHelper ( ) ) == null ) ) { light . setCameraHelper ( new thothbot . parallax . core . shared . helpers . CameraHelper ( light . getShadowCamera ( ) ) ) ; <START_BUG> light . getShadowCamera ( ) . add ( light . getCameraHelper ( ) ) ; <END_BUG> } if ( ( light instanceof VirtualLight ) && ( ( ( ( VirtualLight ) ( light ) ) . getOriginalCamera ( ) ) == camera ) ) { updateShadowCamera ( camera , ( ( VirtualLight ) ( light ) ) ) ; } Camera shadowCamera = light . getShadowCamera ( ) ; shadowCamera . getPosition ( ) . setFromMatrixPosition ( light . getMatrixWorld ( ) ) ; this . matrixPosition . setFromMatrixPosition ( light . getTarget ( ) . getMatrixWorld ( ) ) ; shadowCamera . lookAt ( this . matrixPosition ) ; shadowCamera . updateMatrixWorld ( false ) ; shadowCamera . getMatrixWorldInverse ( ) . getInverse ( shadowCamera . getMatrixWorld ( ) ) ; if ( ( light . getCameraHelper ( ) ) != null ) light . getCameraHelper ( ) . setVisible ( light . isShadowCameraVisible ( ) ) ; if ( light . isShadowCameraVisible ( ) ) light . getCameraHelper ( ) . update ( ) ; Matrix4 shadowMatrix = light . getShadowMatrix ( ) ; shadowMatrix . set ( 0.5 , 0.0 , 0.0 , 0.5 , 0.0 , 0.5 , 0.0 , 0.5 , 0.0 , 0.0 , 0.5 , 0.5 , 0.0 , 0.0 , 0.0 , 1.0 ) ; shadowMatrix . multiply ( shadowCamera . getProjectionMatrix ( ) ) ; shadowMatrix . multiply ( shadowCamera . getMatrixWorldInverse ( ) ) ; this . projScreenMatrix . multiply ( shadowCamera . getProjectionMatrix ( ) , shadowCamera . getMatrixWorldInverse ( ) ) ; this . frustum . setFromMatrix ( this . projScreenMatrix ) ; getRenderer ( ) . setRenderTarget ( light . getShadowMap ( ) ) ; getRenderer ( ) . clear ( ) ; this . _renderList = new ArrayList < WebGLObject > ( ) ; projectObject ( getScene ( ) , getScene ( ) , shadowCamera ) ; for ( int j = 0 , jl = _renderList . size ( ) ; j < jl ;

Fix:
getScene ( ) . add ( light . getCameraHelper ( ) ) ;