CSM and infinite far plane

I was attempting to use CSM but my camera setup applies maxZ = 0 (infinite far plane).

Although I set shadowMaxZ to a finite value, I think the infinite far plane is breaking CSM: Infinite far plane CSM | Babylon.js Playground (babylonjs.com)

Adding @Evgeni_Popov our crazy shader guru who developed CSM in the thread

This PR will fix the problem:

2 Likes

Thank you for the quick fix @Evgeni_Popov !!