I am using Babylon.js v5.0.0-alpha.2 - WebGL2 on my local. On my scene i have PointLight, Ground and Box. When i try to create shadow, quality is low. But same code on Playground gives high quality result. I am confused, which setting i should check?
Now i see the difference, when you increase the y value of the PointLight position, quality of the shadow decreasing. So when the light source is far away quality decreasing i think, what causes this?
Another example, i add the range for the light which is far away from the object. Shadow quality still low, i think i am missing something about how ShadowGenerator.
If the light is far from the objects it lights, the quality is lowered because the shadow map must handle more 3D space than when it is near the objects.
Here’s the shadow map with your settings for the Y negative direction:
Same thing but moving the position of the light nearer the cube:
You can see the cube is using more space in the shadow map, so the shadows will be better:
Note that for point lights blur exponential shadow is downgraded to exponential shadow because generating shadows for point lights is expensive. If possible, try to use a directional light instead.