I'm looking to create realistic shadows in my scene using a DirectionalLight to simulate sunlight. However, I'm struggling with the shadow quality settings - toggling between on/off, Low, Normal, and High:
Setting parameters a and b within these ranges: a = 512 to 8192; b = 300 to 8000
light.castShadow = checked; - no change (though reloading objects does work)
light.shadow.mapSize.width/height = a; - this adjustment works
light.shadow.camera.top/bottom/left/right = b; - no impact observed
I've attempted various methods to update the shadows, but none seem to be effective:
light.shadow.camera.updateProjectionMatrix(); - shadows disappear entirely
scene.updateMatrixWorld();
camera.updateProjectionMatrix();
camera.updateMatrixWorld();
camera.updateMatrix();
Is there a more efficient way to simulate sunlight in the scene? And how can I refresh the shadows?
Here's an example to illustrate my point better -> Example