Artifacts in DFRS (Distance Field Raytraced Shadows) rendering


I was fiddling with dynamic lights and the new DFRS system and it’s well, the best thing after bacon.

One thing I discovered though is that with extreme angles and very near positions the lights inteact with geometry in a very weird way. The atrifacts actually resemble the distance field visualizations.
It’s not a big deal, one would just avoid this extreme scenarios, but maybe devs didn’t see this coming so i’ll post some screens.

This one is set to resolution 3

This one is at 7. Notice how the banding stays similar and is affected by the shape of the DF

That’s it! Other than that thank you so much. I didn’t really care about DFAO, but those shadows are the best and they are actually faster than CSM!

Try turning off CSM

Also make sure the light source isn’t intersecting with the mesh.

Ahhh so it’s not just me - is there any hope that the weirdness with these two combined will be fixed at some point?

There’s probably a setting that should be adjusted so that it switches correctly between them based on distance or something, but I haven’t messed with the settings much yet.

What kind of weirdness have you run into? If you are talking about the transition gap between the two increasing Cascade Transition Fraction helps.

So in my case, if I have DFRS on and have a light source with CSM shadows near it - the CSM has a strange overlay in the right eye (this is in VR mode). Works fine with DFRS off and the CSM light source.

Sorry I forgot to put in all the info

  • Light is not intersecting with the mesh (gonna doublecheck if source radius does though)
  • CSM turned off (otherwise i would not see the DFRS up close since CSM would take over)
  • No fancy postprocess going on (no LPV etc), SSR at 100% quality
  • AA set to FXAA (just for kicks, no real reason)

Oh, it may be a VR specific bug then. I dont have an Oculus and the only issues i’ve run into with DFRS so far has been caused by some of my meshes. All the other cascade and transition issues can be solved with cascade parameters if you want to use them both in a non-VR environment.

If the light source radius isnt intersecting for sure, enable Generate Distance Field as if Two Sided in static mesh editor then apply changes and see if it makes a difference.

You can also look at the Distance Field visualizer so you can make sure that your distance field scale is high enough on each object. I’m not sure how it works with BSP, maybe it doesn’t.

It might be, but my intuition is that it isn’t VR specific - or at least is part of the problems affecting CSM that happen even without VR.

I think maybe part of the issue are the settings, which I haven’t messed with at all - even when not in VR mode I see some sliding of the far shadows against distant objects. I imagine the cascade parameters and stuff need tweaking.

All of the models were static meshes but…
…source radius was actually intersecting the door mesh! problem solved. As i said before, best thing after bacon!