Better shadow quality

Please advise how to create better shadow quality. I’m trying to create a shadow of sphere. Although the sphere is small, the shadow is not good with the setting (see photo please):
var shadowGenerator = new BABYLON.ShadowGenerator (4096, light2);
shadowGenerator.setDarkness (0.5);
shadowGenerator.usePoissonSampling = true;
shadowGenerator.bias = 0;
I use omni-point light. Can I get a tip? Is there a way to make the shadow better, smoother?shadow

Well first tip: Please create a repro in the Playground :slight_smile:

Then we can see if PCF could be used maybe(Shadows - Babylon.js Documentation)

Unfortunately PCF won’t be usable with an omni-ligtht because it takes too much resources.

@Johny_Mickey If possible you should use another type of light, omni lights are resource hungers (they need 6 shadow rendering…).

(unless you can give them a direction and then we will consider them like a directional and we will render only one side of the cube)

True, forgot this one!

1 Like