Jagged Shadow?

Hi, I’m pretty new to Unreal Engine, I was playing around with the lighting in UE 5 and I noticed these Jagged shadows and I don’t know how to fix them. So far I’ve tried to increase the source radius and it didn’t seem to change anything. I suspect it might be caused by nanite triangulations but it’s producing the same shadows on non-nanite objects as well. Please help, thanks!


1 Like

Got the same problem. It only appears when virtual shadow maps are on. Hope someone can help!

This might be it:

Shadow Resolution

VSMs provide significantly increased resolution compared to conventional shadow maps, but shallow light angles (or projective aliasing) and very large local lights can exhaust the available virtual resolution. This can present itself as box-like shadows and bias issues depending on the geometry’s surface. Directional Light clipmaps are much less susceptible to running out of resolution, but very narrow camera fields-of-view can eventually exhaust those as well.

There is no simple solution to solving projective aliasing with shadow maps. Even with VSMs, some care must be taken to avoid the worst cases.

1 Like

Increasing screen percentage does help with the shadows. But this is not a great solution.

How about “r.Shadow.Virtual.ResolutionLodBiasDirectional”
Try Changing from -0.5 to lower value.
In my case it improved.

If you are using a local light, try using
“r.Shadow.Virtual.ResolutionLodBiasLocal”

12 Likes

This helped a lot! What does the value mean tho? What value would push it to the limit?

For example, you can decide the value while looking at Fps.I think you should decide according to your purpose.

I’m sorry I’m not good at English :scream:

Thanks for this.

The jagged shadow is a cool effect this may prove to be useful. Thanks for reporting this.

Hey, I don’t know how to access this. I paste it into my command line, but I can’t change the value.

bruh! you are amazing!

I was having these shadows when running an indoor scene in lumen.

When I switched to bake lighting and increased lightmap resolution, the shadows became smooth.

Try turning off the virtual shadow maps (Beta) in project setting. Choose the shadow maps instead.

Project setting → Engine → Rendering ->Shadows->Shadow map method ->shadow maps ->virtual shadow maps (Beta) X shadow maps O

5 Likes

Hey I’m having the same issue on UE4 mobile rendering. The shadows look fine in the engine preview but on my mobile I get really jagged shadows. I have tried to increase the shadow resolution and lightmap resolution as well but it doesn’t do anything. Is there any way to apply the “r.Shadow.Virtual.ResolutionLodBiasDirectional” command on mobile packaging and not just the viewport? I cannot find any solution to this and the shadows look really ugly. My only option is to remove the shadows entirely from my game which I really don’t want to do. Please help.
Thank you.

UE4 doesn’t have virtual shadow maps, and it wouldn’t be supported on mobile anyway. You’ll probably need to look at cascade shadow settings if they are dynamic shadows.

Hey, thanks for the reply. The shadows I’m using are Modulated Dynamic shadows with a Stationary Directional Light, as that is the only way to get dynamic shadows on mobile. I have attached my light settings for reference.



And also these are the Engine Preview vs Mobile device Shadow Render

Any help would be much appreciated as I’m completely stuck with this issue.
Thank you.