I’m running into some strange issues with a CascadedShadowGenerator.
They look great most of the time:
but from certain camera angles, they appear to get spotty:
Unfortunately I can’t share a playground as this is a very large project I’m making that currently relies on a connection to a server to load in.
Here’s my code for setting up the shadow generator:
shadowLight = new BABYLON.DirectionalLight('light', new BABYLON.Vector3(-1, -2, -1), scene); shadowLight.intensity = 0.5; shadowLight.diffuse = BABYLON.Color3.FromHexString("#f7edc6"); shadowLight.specular = BABYLON.Color3.Black(); shadowLight.position = new BABYLON.Vector3(512, 32, 512); shadowGenerator = new BABYLON.CascadedShadowGenerator(2048, shadowLight); shadowGenerator.lambda = 0.8; shadowGenerator.autoCalcDepthBounds = true; shadowGenerator.stabilizeCascades = false; shadowGenerator.depthClamp = true; shadowGenerator.usePercentageCloserFiltering = true; shadowGenerator.filteringQuality = BABYLON.ShadowGenerator.QUALITY_HIGH;
Wondering if anyone has any tips to help. Thank you!