Realtime shadows only work when SSAO is enabled

Hi! I’m experiencing strange behaviour with Oculus Quest 2 and Unity 2021.3.6f1, URP 12.1.7.

I have a small scene which uses 1 realtime directional light. I want to disable AO, but keep the shadows from that light. I see shadow in the editor and in play mode (quality settings the same - Balanced) all the time (whether or not SSAO is enabled). But when I build and run it on Oculus Quest 2 there are no shadows if SSAO is disabled.

I’m probably missing some other settings, but not aware of any relevance of how SSAO can affect shadows.

Does anyone have a tip for me? Any other important information I did not mention?

Thanks.


1 Like

Update unity
Make sure realtime shadows are enabled
Try a blank project

Updated to 2021.3.16f1. Tried a blank project. Still same problem. As soon as I disable SSAO shadows also disappear.

Make sure realtime shadows are enabled

How to make sure realtime shadows are enabled? Well I did not find exactly checkbox “realtime shadows” :smile: I think I looked everywhere in project settings and in rendering pipeline asset - everything containing word “shadows” looks enabled, made sure my light is realtime.

Are you using different URP profiles? Make sure shadow are enabled in the URP profile you use in Quest.

1 Like

evstinik - I’m seeing the same issue. very strange. did you figure it out?

If you have this issue I suggest making a bug report

Unfortunately no, but I have discovered that it’s not really Quest-related. It’s more of differences in behaviour between play mode and build. I have tried to make a Desktop build and have the same results - standard balanced URP profile with disabled SSAO has missing shadows.

Did you make a bug report?

No, I have not, I still believe there is an error somewhere between monitor and chair :slight_smile:

What?

I think that problem is me: I don’t do something right or have messed up some configuration.

If you tried it in a blank project and just disable the ssao (maybe make a video recording of it), it sounds like a bug. You could also loop up some kind of sample project so you can test it on your device

Same problem for Android. Can’t seem to find a workaround… SSAO really slows my game down…

Make a bug report in a small repro project

can confirm this issue still exist after 2022.2.5

For anyone facing the same issue , simply remove the SSAO from the renderer or use the performant renderer as it doesn’t have the SSAO by default.

Heyhey!
This seems like a bug.
I have one pretty similar to this one but that one doesn’t make the Shadows disappear.
I’m currently working on backporting the fix for that to 2022.2 and 2021.3.

Can you send a bug about this one so I can verify that my fix also solves your issue?

1 Like

Does that also include the bug report I made about a shader not displaying when shadow cascades keyword is used but shadow cascades is disabled in the URP asset? (IN-30157)

I’m experiencing this issue and posted bug report IN-42273 with a project that reproduces it - shadows in the editor, but no shadows in a build.

I’m using Unity 2021.3.26f1 on Windows 10 with the built-in render platform and running the build on the same box used for development.

same issue…
2021.3.22f1 URP-Balanced android build
try to change the shadowmask mode (Quality Setting).
shadowmask > distance shadowmask
9047422--1249852--upload_2023-5-31_17-6-47.png