Shadows flickering in VR UE5.4.3

I’ve recorded a video to show the issue. The left eye lens renders the shadows extremely bugged. They’re flickering like crazy.

This doesn’t matter whether the lights are set to static, stationary or movable.

It happens whether nanite is enabled or not.

It happens whether Mobile Multi-View and Instanced Stereo are enabled, disabled or either of them individually enabled or disabled.

The one thing I noticed when I migrated my project to a fresh VR template project is that the flickering stopped during forward rendering with nanite disabled. But then started flickering once I turned forward rendering off and enabled nanite.

Now if I disable nanite it’ll still flicker.

I cannot use forward rendering for my project as I’m heavily relying on a post-process volume with stylisation that isn’t supported.

The next issue is that the lighting renders fully shadowed in the right eye if the post process volume is in use. I still get flickering shadows in the left eye.

This also still happens if I use Vulkan SM5/ SM6 and DX11 as opposed to DX12.

I believe it’s something not inherent to nanite but the deferred renderer itself because this didn’t happen in UE 5.3. Unfortunately I can’t go back to that version right now.

Does anyone know why this is happening and if there’s a way I can fix it please?

Have you tried setting r.Shadow.Virtual.OnePassProjection=0 ? I had a similar issue and this fixed it for me. It disables an optimization so expect s small fps drop

1 Like

I will try this now. Thank you I’ll get back to you

Update: This didn’t seem to change anything

Here’s an updated video to show the situation. It’s worth noting that the shadows in the right lens are completely covering everything, meaning zero lighting is being done in my right eye.

It’s also worth mentioning that the lights doing this is not the Dynamic Light for the sun. It’s just point lights, rect lights, spot lights.

UPDATE:

The command needed to be typed different: r.Shadow.Virtual.OnePassProjection 0

That works for the flickering light issue.

Now for the right lens issue…

NIce the light-flickering issue has been solved.
As for the right-eye issue; normally when something only happens in one eye, its a bug / ‘feature’ that most of the times can be solved by disabling Instanced Stereo and /or Mobile Multiview. UE uses all kinds of smart ways to maximize the framerate and these options solve most of these problems in VR. These are optimizations so you will loose some framerate I’m afraid

1 Like

Thank you, unfortunately that didn’t solve it. I think it’s a bug. So what I did was I combined both the shadow hatching post process material with the outlines material and made just 1 post process material with them both included, and both carefully blended together.

This somehow just worked. I noticed prior to this that the outlines in the right eye were inverted, so in the left I had black outlines as expected but in the right they where white.

I’m not sure why, but this made me thing of just combining them both into one shader.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.