I noticed this problem first in my project after I migrated to UE5.4. The shadows from objects were all broken. They are semi-transparent, distorted and jump all over the place when I turn my head. I then tried to create a project with VR Template from scratch and got the same result. We are talking about default rendering settings: Forward Shader, Virtual Shadow Maps, Lumen, Nanite. On top of that Niagara particles experience the same issue (e.g., rain or snow from Ultra Dynamic Sky).
Steps to Reproduce
Create a VR Template and run it in VR Preview on PC (Meta Quest Link, Quest 3 if it makes any difference).
Expected Result
Hands and objects cast correct clearly visible shadows.
Observed Result
Shadows from hands and objects jump around, semi-transparent, and distorted.
Platform(s)
Windows 11
Additional Notes
I’m on NVIDIA GeForce RTX 3080. I re-tested, I don’t experience these shadow issues on UE 5.3.2, neither in my project, nor in VR Template.
Commit also include changes in the Engine/Source/Runtime/Renderer/Private/SceneVisibility.cpp but for the temporal fix you can skip them(unlees you want to recompile the engine).
Thank you so much! It’s good to know that I’m not alone and the bug can be fixed. I’m a bit cautious to go back to 5.4, though. I also saw some reports that the performance is compromised, although I didn’t notice it. I wonder if it is, when you fix the shadows.
Thanks, you saved me some millions of neurons I was spending trying to find a solution to the weird lighting. 2 weeks searching.
This bug also affects every type of light! static stationary shadow map and virtual shadow map, not with lumen.
It should be advised.
Thanks!
Quest 3 VR preview:
I don’t see the shadow artifacts in the right eye but it does appear in the left eye. I no longer have 5.4.1 to test if it was just a one eye issue there as well.
I can also confirm that 5.4.2 still has this issue. I am experiencing broken shadows in the left eye and performance issues. This is with a Quest 3 and 4080.
As far as I can tell this is a 100% lumen/shadows issue.
If you have light sources which produce shadows, you will probably get vastly different shadow rendering per eye; either shadows in one and not in the other, soft shadows in one and hard shadows in the other, or any flickering nausea inducing combination of these things.
Disable ‘casts shadows’ for the lights, and the problem goes away (along with all your shadows of course!)
Hey guys … looks like there were a few other changes that snuck into UE5.4.2 hotifix after I posted the UE5.4.1 fix. The below shader fix only fixed UE5.4.1.
If you’ve updated to UE5.4.2 you’ll need the below fix which is multiple shader file replacements.
UE5.4.2 Launcher fix. (Replace the shader folder in Epic Games/UE_5.4/Engine/ Shaders.zip (2.7 MB)
This should handle mutli-view for mobile as well but I’ve yet to be able to test quest standalone just yet. I also see this should be making it into another hotfix (UE.5.4.3) you can work around this issue by disabling instanced stereo until 5.4.3 releases if you rather not manually patch your shaders
This can only be applied to ue5.4.2 …. If it still isn’t working properly you can delete the shaders folder and validate the install from launcher to return the default shaders. I’m currently using without issues. Are you on windows and are you validating that the shaders are extracted into the proper directory? "yourinstall directory/Epic Games/UE_5.4/Engine/Shaders should actually contain the extracted files so be sure its not Shaders/Shaders/Files by mistake.
The shader changes are actually part of the upcoming ue5.4.3 and I’ve only manually zipped the changes from this PR. To help others quickly patch without manually changing each or needing git
I’m sorry you having issues but they are working for me. I’ll clear my shader directory download from my upload and see if I can repo your outcome. (did this step this morning to validate)
The simplest way is to rename the original ‘Shaders’ directory in-place as something like ‘Shaders_OLD’, and just copy the new one into the Engines/UE_5.4/Engine folder.
Doing that, I personally have no crashing or compilation errors.
After doing so, I rebuilt my entire project… just ‘because’
I went into a level that had known shadowing issues, and reenabled ‘cast shadows’ on the lighting.
NO CHANGES!
Still the same glitching, solid hard shadows with one eyes, soft edged shadows with the other, and general flicking all over the place.
So… certainly not a fix for me. And if this is the fix from the upcoming 5.4.3, then it looks like its still gonna be bugged for some time to come
I’ve just tested with the shaders posted above and it appears to have fixed the issue for me. I’m not seeing any glitched shadows in the VR Template. I still need to test it with my main project.
Applied the Shader replacing approach and still not rid of the problem. Me left eye shadows flicker like crazy on and off in VR. Right eye is just fine.