I know a lot of folks who would love to have Cached Shadows in URP. This feature is in HDRP, but is not on the URP public roadmap and I have not heard of this in a while. Is it planned?
We ourselves implemented it and the gains from it are truly non-negligible.
The additions of Renderer.staticShadowCaster and ShadowObjectsFilter.StaticOnly/DynamicOnly in 2021.1 make it even more worthwhile to have dynamic + static shadows on the same light.
Also want to say that we have had this in a couple years now in built in RP because we wrote our own system for it. It’s a total deal breaker on mobile without it. So definitely would love to see this come to URP also. But it’s gotta be a performant solution with adjustable settings, not some “one size fits all”.
Heyhey!
I’ve recently been working on collecting and prioritizing feedback/requests for Shadow improvements in URP, and adding Cached Shadows are high on my list. Both for the benefits as well to get parity with HDRP.
Getting comments like these help me place it even higher, so thank you!
Hi @Elvar_Orn
Also, is there any plan to support shadow rendering that can be shared between cameras in general SRP? Like a ShadowManager that collects every camera’s shadow requests and process them so that no shadow view is rendered twice?
The biggest example of this would be multiplayer splitscreen where sometimes punctual shadowmap from the same light are needed.
Hi @Elvar_Orn ! I couldn’t find this feature on the Unity URP rendering roadmap. Are cached shadow maps still on your priority list?
In Unity 2022.2.x there is a Static Shadow Caster toggle on mesh renderers in URP but apparently it doesn’t do anything at the moment.
Heyhey!
I’m still working on wrapping up some Shader Stripping and Prefiltering improvements so I haven’t been able to start on any shadow improvements yet. I’m hoping to being able to wrap my current tasks in the next few weeks. After that I hope to get started on some Shadow tasks. Where this will be positioned is difficult to say before estimations and prioritizations have been made but I’m confident (without promising) that this will be placed high on my list.
I will at least push for this, especially after getting this feedback from you all
No unfortunately not.
My work for Shader Prefiltering & Stripping improvements is now 95% complete for 2023.2 and 2023.1 (One PR to land in both versions). After then I need to create backports to 2022.2 and 2021.3, verify that everything works and fixes the bugs I’ve resolved in the newer versions.
After that we will prioritize and come up with a plan.
I have already mention this to my team that is a highly requested feature so I’m hopeful.
I’ll create a reminder to myself to reply here in 4 weeks to give an update but expect that it will take some time to prioritize things, start work, implement, test and finally land. But I think it will be a good idea that I share the progress either in this thread or in a new one.
Uhu! That’s great to know @Elvar_Orn ! Thank you so much for the feedback! Really useful to at least get a feel of the roadmap ahead. Much appreciated!
Would it be possible to add this cache on the centralized Unity-roadmap? We may be able to help by submitting a report on the “How important is this for you?” form.
Our application runs in WebGL in URP. The sun and the scenes are static most of the time. Caching all these shadow-maps would be a huge deal, especially for our clients on low-end devices and on mobile.
This task is still being considered for when Shadow Improvements begin. Unfortunately I won’t be able to start on those yet as there are a few other tasks that I’ve been asked to work on and finish before. This will take some time.
I however will try to work on Shadow improvements prioritization as well in this quarter and the good news is that I’ve made the higher ups well aware of the importance of this for you.
So I’m trying as much as possible to get started on this but I will need to ask for patience as URP covers so many areas and many of them need some focus. I’m a little scared of promising a date for another update but let’s say I come back in June with an update, even if it’s just a no update post.
Are you literally the only person working on URP? Why Shadows improvements are bottlenecked by Shader Variants?
I’ve only now realized that Static Shadow Caster is HDRP only feature, but is visible in URP since 2021 and does nothing. What a confusing joke.
Not to push on you specifically, but it’s just ridiculous how much time it takes for any basic features to come out.
Shadows are the most pain right now, they need both performance and quality. You can’t look at them without tears of pixelated jitter and bias artifacts (especially when back side is translucent / light wrapped). And my GT 740m can’t handle even 6 spot lights with low shadows, not mentioning point lights.
Now, let me dream for a moment. There is so many different rendering techniques that URP could have, to satisfy all kinds of use-cases/needs, performance targets, and make some games an actual possibility.
Just to name a few:
I’ve been wondering why Unity never went for Variance Shadow Maps instead of PCF. I’m not exactly an expert on this topic, but everything I’ve read suggests that the shadow quality is way better, even with smaller shadow map resolutions.
Looks like it’s not even hard to implement! And performance should be much faster, since it’s only 1 fetch per-pixel, + they eradicate bias artifacts and aliasing thanks to blur. (yet might look weird, expanded, incorrect… or lets say - stylized :p)
All types of VSM suffer from light bleeding inside fully-shadowed penumbra (which is especially noticable with translucency), which can be mitigated with some sorts of clamping/threshold, or by using Layered VSM.