UE5 Distance field shadows

@VictorLerp Did something change with how Distance field shadows are viewed or handled in UE5-01 for VR?

Reason being, I recently upgraded my UE4 4.27.2 VR project to UE5-01 to continue the project there and to be prepared for the future of VR + UE5 in general. After taking care of a few small issues, I have noticed that DFS does not render properly between both eyes using an Oculus Rift S for development ‘currently’. The new UE5 shadows are breath taking in VR, but I have to disable DFS due to any shadow casting static mesh (foliage excluded) shadows rendering different while in the distance no matter the DFS settings. I’ve tried so many different variations in the settings but all have the same problem of not rendering properly between each eye in VR. I did not have this problem in UE4. DFS is great for filling in the areas where cascaded shadows don’t especially for VR. I’m still using the standard way of lighting with shadows for performance reasons in VR.

In UE5 Rendering i have disabled Lumen, Hardware Ray Tracing, Global Illumination, Reflections, everything unticked in the Default settings catagory but I am using Deferred rendering, Virtual shadow maps, DLSS and everything in the Optimizations category…for the best performance + visuals in VR at least for my system.

Am I missing something concerning DFS in VR? Like I mentioned earlier, did something change? Any ideas to steer me in the right direction for DFS use in VR?

Cheers!!!

Sure isn’t reassuring when you feel totally ignored…especially when it comes to VR developement. Not even an acknowlegement or anything is just plain frustrating.

First of all, I’m not engine support. I happen to be very active on the Forums in the XR category because I care about ya’ll being able to succeed with your projects, but there’s only so much I can do while making sure that my responsibilties are covered.

On this particular topic, I don’t have an immediate answer, which means that I would have to try and reproduce your issue, which can take me any amount of time, and it might not yield the same results. You’re also using tools that aren’t native to Unreal Engine (DLSS), which is something that Nvidia supports, not us.

Have you tried disabling “everything” and test? Virtual Shadow Maps are in beta and a feature we didn’t have in UE4, have you tried disabling them? They’re not supported w. the Forward Renderer so I wouldn’t be surprised if they don’t work in Deferred/stereo either.

If you think you’ve come across a bug, you should submit a bug report. If you don’t get traction on that, your best case of action is to provide a list of reproducible steps that displays the same issue you’re seeing. Not your full project, but a list on how we can reproduce the issues you’re seeing.

I asked for you to answer because I have seen you active in the XR forums. Like everyone else looking for answers, we don’t know who does what at Epic, so no reason for you to sound frustrated. Initially, a soft answer stating it’s not your dept or ? Would have been sufficient as an acknowledgement.

Thanks for the suggestions, but I have tried everything. I don’t just ask the question without exhausting all attempts at a solution on my end. DLSS has nothing to do with this…btw. I have been using the standard shadow maps instead for now until VSM is in a better state. The same happens with standard SM…BTW. I’ve decided to forget about using DF for now…many other things to concentrate on.

Cheers!!!

We identified and fixed the issue on Main already: https://github.com/EpicGames/UnrealEngine/commit/f43f655d5a7c2fc68940a287df8e46684e22fbd9

The fix can’t be included in a hotfix for 5.0, but it’ll be in 5.1.

1 Like

Wow, that’s great!!! Thanks so much for letting me know. I can wait until 5.1. Hope I didn’t offend you to much with my frustration. Apologies if I do so. Later!!

Cheers!!!

2 Likes

I stumbled upon this old thread just because I’m having the same issue mentioned on the first post in Unreal 5.1.1. The fix mentioned was applied to this version or was postponed? Using distance field shadows on forward shading render different for each eye at some cases.

Using the default engine with no modifications.
DirectX 11. No raytracing nor lumen and nanite. Just the basic for good performance in VR.

Anyone else still having this problem?

1 Like

Since that time, I have a copy of my project from 5.0.3 converted to 5.1.1 but I have given up using 5.1.1 for now…as there are too many performance issues with VR in 5.1.1. I am using deferred rendering for my VR due to the better lighting capabilities among other things…but I believe the distance field shadows issue has been resolved, at least for the deferred. Not sure about forward tho.

There seems to be a lot of people stating a major performance loss using 5.1.1 as compared to 5.0.3…and not just on the Epic support forum. For my project (which is huge) 5.0.3 runs like butter…so I’ll most likely stick with 5.0.3 and live with the lack of distance field shadows until 5.2 or 5.3 when performance issues should be fixed by then. With Sony’s PSVR2 hmd now available and the fact they are using UE5 for new projects…VR issues will most likely be taken care of sooner rather then later. Fingers crossed!!!

:confused: After you mentioned it, I tried switch to deffered rendering, and the problem is the same, all objects that use distance field shadows have weird artifacts… Also the distance field indirect shadow don’t seems to work at all… :confused:

I wonder if they are aware of this problem, or should I open a bug report…

Let’s hope that PSVR2 can make the next UE versions more stable for vr.

Yes, that does look weird…almost like a shadow resolution problem… Definitely open a bug report…that will at least get them on the radar about this. Cheers!!!

1 Like

Yes, I have the same issues. Forward shading in 5.1.1, DFS cause serious artifacts…

Distancefield shadows still don’t work (in VR) in 5.2 ForwardShading :frowning:

That doesn’t look like artifacts, but the Distance Field Shadow resolution being low. Use the Vizualisation View Mode for Distance Field Shadows to see what the light is computing the shadow off, and increase the resolution for either the mesh, or the global field (be wary of performance impacts when increasing the global resolution).

I suspect that you’ll see the same result if you’re not rendering in stereo. But if there is a difference between left/right eye, do let me know. Thanks!

Ok thanks, I’ll try that!

Do you mean the resolution of the mesh distancefield or is there another setting for the distance field shadow resolution?

Right eye looks terrible and verty different from left eye (captured)

This is how it looks non-stereo:

and
stereo after increasing global voxel density to 0.4