Android vulkan dynamic shadow issue [VR]

I have an issue with mobile development for bigger scenes (city scale) and dynamic shadows.

I’m using cascaded shadow maps and also far shadow cascade.
Also I’m using the built-in SunSky for time change.

My directional light is dynamic, the ambient light is static (only one dynamic source supported).

Shadows tend to disappear upon your view direction, see following video for the short effect:

The effect does not change when changing CSM distances, num of cascades (both, far and near), use contact shadows and so on.

For me it looks like the engine disables receiving shadows on objects which are not “full” in the field of view.
Anyone got a clue?

P.s. this effect also exists on Android ES3.1, not only vulkan

Edit:
It seems to be, that when distances for dynamic shadows (and far shadows) are not too high (i.e. 10k and 100k (normal and far shadow)), it seems to work.
Is it possible that the fov/frustum get’s streched by this distance and therefore the angle is smaller and therefore the objects get culled from the shadow map ?

Hi Daniell!

I was running into similar issues. It must have something to do with the Dynamic Shadow Distance for moveable Lights.
If you jump over to my slack channel we can discuss and develop stuff.

My slack Link is here:

cheers

The console command “r.Shadow.RadiusThreshold” helped me with what sounds like a similar issue. The default is 0.03, for me setting it to 0.02 fixed my disappearing shadow issue.

2 Likes