Description of the problem
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
Three.js version
- Dev
- r93
- …
Browser
- All of them
- Chrome
- Firefox
- Internet Explorer
OS
- All of them
- Windows
- macOS
- Linux
- Android
- iOS
Your shadow map has 0.25 trillion pixels.
Make all of the following changes to your code.