Soft shadows for XR

Is there any chance the soft shadow situation can be looked into (or is there any info available on it?)

Since 2022LTS the soft shadows have been broken for most XR projects, both ARCore and Meta/Oculus. This is very frustrating, as shadows really sell the immersion of those platforms.

Bug: Unity Issue Tracker - [Android][URP][XR] Soft Shadows not working in the Player when using ARCore XR Plug-in

Also providing documentation or how to handle shadow tiers in custom lighting shader graphs would be very much appreciated. Shadow Receiver URP is how I found out about this issue.

1 Like

Hi @DevDunk,

Sorry about getting back to you late.

I checked the case in detail and it is related to the work we did to disable per light soft shadow on untethered XR platforms such as Quest. Here is the commit if you are interested in the gritty-nitty details

It is done this way because soft shadow quality levels are controlled by dynamic branches, and this has a performance impact bigger than expected on those platforms. We disabled the per-light quality levels and use only the global settings in the URP asset for soft shadow control. We also added warning checkbox:


Only per-light quality level soft shadow is disabled. Soft Shadow Quality setting in the URP Asset should still work to enable soft shadow.

Our current understanding for the ask is to remove the soft shadow special handling, which we have concerns about the performance impact it may imply. So to make it happen, we will need to find a way to enable software shadow on those platforms and at the same time mitigate the performance risks. From our perspective, the ask is considered as feature request instead of bugs because the current behavior is by-design.

Hey there.
The limitation you are describing is annoying, but acceptable.
The issue I was asking about was that soft shadows do not work at all in many xr projects.
For a demo project it works great on Android, with only using the URP asset’s soft shadow setting, but as soon as I enable ARCore, soft shadows stop completely.

60% of reports I get on Shadow Receiver URP is that the soft shadows do not work in builds, and I keep having to send them to the issue tracker. This also happens on URP shaders like Simple Lit, so it’s not just my shader

Thanks for the details…

Sorry to hear the challenging situation. Am I understanding correctly that softshadow breaks when ARCore is enabled(this is not per-light softshadow which is disabled on purpose, but the pipeline setting global soft shadow)?

This sounds odd to me because the ARCore package shouldn’t really impact the URP shaders…
I don’t know what’s happening without investigating. However, our bandwidth is very low at the moment and I don’t expect this issue to be looked at anytime soon.
I can bring this to ARCore team to see if they have any insight if this sounds good to you.

Yes, when all lights have soft shadows on ‘use asset preset’ and soft shadows in the asset at any tier, it breaks in builds when checking XR. I assume it is an issue for XR shader compilation.

It’s not just ARCore, also Oculus/Meta :confused:
I talked about it a bit with Andy from the XR team and he said it was an URP issue

I see this thread was moved to the new office hours. Looking forward to hearing if the platforms team has some info on this!