Download

Distance Field Lighting causes square pixelated flickering

I’ve run into a strange issue with Distance Field Lighting with a barn I’m working on. For some reason, when on the interior of the barn, I’m getting a flickering light artifacts when I have distance field lighting enabled on my light. No matter where I move the light outside or if I move the camera, it consistently happens. None of the other areas of my scene currently have this problem.
Raytracing and a standard light work fine, but I want DFL for the soft shadows.

I’ve also noticed when viewing the buffer for Distance Fields that it has flickering on that as well and seems to ‘cut out’ certain areas of the scene depending where the camera is, (shown circled in red below), but I don’t know if this is just a bug with the visualization.

Anyone have any clue what this may be? I’ve tried a number of things to resolve it but had no luck so far.






After some more experimenting, I found that it was being caused by having a mesh distance field enabled on the thousands of animated cornstalks outside the barn and the grass as well. I’m assuming there were too many objects in the scene using distance field which started to cause computation errors by the engine? Not really sure.

But now I run into the problem that I want DF shadows on my grass so they still cast shadows (since my lights all have DF on) but if I enable that I get the flickering issue in the barn.