I was working on my project today when suddenly it stop working. Checking the console log I got this message:
"three.js:18057 THREE.WebGLProgram: gl.getProgramInfoLog() C:\fakepath(309,8-98): warning X4121: gradient-based operations must be moved out of flow control to prevent divergence. Performance may improve by using a non-gradient operation"
I realised that the problem was associated with the shadow map.
Demo: https://codepen.io/FilipeNowicki/pen/vryBRe
I'm unable to reproduce the error with your demo. When i enable shadow mapping, the result looks fine without any messages in the console. Tested with macOS with Chrome.

AFAIK, X4121 is a HLSL warning. So I guess this issue is Windows exclusive.
@Age-of-the-Witch-Hunt Does the shadow map still render? Do you see any visual errors because of this warning?

When I enable the shadowMap that's what I get. I've tried in chrome and firefox and got the same error. I use windows.
Your shadow map has 0.25 _trillion_ pixels.
Make all of the following changes to your code.
dirLight.shadow.mapSize.width = 1024; // was 500000;
dirLight.shadow.mapSize.height = 1024; // was 500000;
var d = was 500; // 5000
var floorMaterial = new THREE.MeshPhongMaterial( { color: 0x006600 ); // was Lambert
var floorGeometry = new THREE.PlaneGeometry( 7000, 7000, 1, 1 ); was tessellated
Thank you, WestLangley! It's on again
The following not appear to be a sufficiently-limiting constraint:
_shadowMapSize.min( _maxShadowMapSize );
...especially, in the case of PointLight, where _shadowMapSize is then increased by a factor of 4.
In fact, even for SpotLight, setting the shadow map size to the so-called "maximum" crashes my machine.
Most helpful comment
Your shadow map has 0.25 _trillion_ pixels.
Make all of the following changes to your code.