Baked shadowmap\ shadow cascade transition

Hello!
I found some issue with transition between baked distnace shadowmask and directional light cascades.



9878043--1424646--upload_2024-6-7_12-48-24.png
And its make a lot problems with dark environment or interiors, when directional light goes through ceiling.

I checked Unity versions 2022.3.14f1 - 2023.2.20f1

What do the settings on this MeshRenderer look like?

There are simple static cubes

I tried to turn on “Static Shadow Caster” flag. But result is the same.

Hey, did you fix the problem or find any solution? I have the similar issue.

No, Im still waiting for reply

1 Like

Hmm. I don’t see any issue with your setup. I’ve seen artifacts on the boundary between shadowmask and shadowmapping before, but usually not this extreme. Not sure what’s going wrong here. The one thing I would try is to see if the issue still reproduces if you flip your shadow cascade allocation so the majority of the distance is the 0th cascade.

If you want to try debugging it yourself, you might be able to get some more information using Unity’s frame debugger. Either way, I’d suggest filing a bug report if this is blocking you.


There is screenshot with Rendering Debugger view. Only three top boxes render in shadowmap.

we found this ticket:

We checked 2023.3.0b10 and there is the same issue with shadows

Might be the same symptoms but with different root causes. The bug is marked as fixed, so if you are facing a similar issue, you should file a new one.

Thank you.
I created a ticket with this problem. I hope it will be possible to fix it in future updates of Unity.

1 Like

Feel free to link the issue ID here so others can see.

Sure

i can confirm that it is still broken in Unity 2022.3.20f1 using HDRP.
and it clearly seems that unity culls shadows casters within the transition range which it should render to the real time shadow maps.
in the marked area neither the stretched cube nor the trees cast real time shadows. so either shadow caster culling is broken or the shadow mask fades out too early.

I see that the fix for this never landed in Unity 2022. I’ll reach out to a colleague who worked on this bug about this.

In the meantime you may consider upgrading to Unity 6 which has the fix.

@larsbertram1 My colleague tells me that the 2022 port of this fix is still in the pipeline. Unless anything unexpected happens, it should land soon. At this point, I cannot tell you which version it will land in.

it is present in each version of unity. regardless if it is unity 2022.x or unity 6.x. even latest 6.x has the exact same issue. i filed a bug report and hope it gets sorted out :slight_smile:

Thank you, @larsbertram1. Can you please drop a link to the bug here?

is is case: IN-89846

2 Likes

Thanks a lot Lars, we have received you bug report.