Update Global Distance Field Volume taking longer than usual
I'm currently part of a team making an open world game and parts of our world have time sinks in the GPU causing the overall framerate to go up.
The biggest culprit in these areas (or so it seems) is "UpdateGlobalDistanceFieldVolume". It is spending about 20ms in here which is an incredibly long time.
Can anyone explain to me why our frame time is spending so long in here, and why we have so many clip maps. As I understand it, only newly visible areas or those affected by a scene modification need to be updated.
For a bit of context we have foliage, landscape, and a rain particle emitter (focused on the player).
Thanks in advance!
EDIT: After some further investigation, I have found that a non-shadow casting Skylight was causing this issue. However, it is my understanding that the distance field stuff is not used when cast shadows is turned off.
The global distance field is updated if any of the features using it are enabled:
It also updates if Ray Traced Distance field shadows are enabled, but that's a bug. You can workaround it by forcing global distance fields off with 'r.AOGlobalDistanceField 0'.
I'll assume you are actually using a feature that requires it. The global distance field is a cache around the camera that has to update if the camera moves a lot, or if you have a moving static mesh which has bAffectDistanceFieldLighting enabled. The bigger the static mesh, the more expensive the update will be. Use 'r.AOGlobalDistanceFieldLogModifiedPrimitives 1' to track down which objects it is and disable bAffectDistanceFieldLighting on them.
Follow this question
Once you sign in you will be able to subscribe for any updates here