So whenever I use shadow Generator to create shadows on my floor mesh. There appears to be some artifacting.
It does not seem to happen on the walls. I am unable to explain it. These are my shadowGenerator and light settings.
const dlight2 = new BABYLON.DirectionalLight('DirectionalLight2', new BABYLON.Vector3(-0.3, -0.5, -1), scene);
dlight2.position = new BABYLON.Vector3(80, 100, 600);
dlight2.intensity = 2.5;
dlight2.shadowMinZ = 0.1;
dlight2.shadowMaxZ = 2000;
const shadowGenerator = new BABYLON.ShadowGenerator(1024, dlight2);
shadowGenerator.filter = BABYLON.ShadowGenerator.FILTER_PCF;
shadowGenerator.setDarkness(0);
// Toggling backfaces does nothing
shadowGenerator.forceBackFacesOnly = true;
shadowGenerator.filteringQuality = BABYLON.ShadowGenerator.QUALITY_LOW;
shadowGenerator.getShadowMap().refreshRate = BABYLON.RenderTargetTexture.REFRESHRATE_RENDER_ONCE;
If someone can explain why it is happening and any solutions to remove the artifacting that be great.