Download

Completely disabling shadow culling at a distance.

I’m doing a cinematic project (not a game) and I need the HIGHEST possible graphic fidelity, no matter if it takes several seconds per frame. I have a terrain and I was able to disable any LOD / billboards from the trees using foliage.ForceLOD 0 + r.ForceLOD 0 but I couldn’t find a way to disable shadow culling, I tried r.Shadow.DistanceScale 10000 and I was able to see the shadows bit further but it seems to have a limit. I also want to disable low quality shadows at a distance (shadow cascades) if possible.

If you look at the code



float GetCSMMaxDistance(bool bPrecomputedLightingIsValid, int32 MaxShadowCascades) const {
    static const auto CVar = IConsoleManager::Get().FindTConsoleVariableDataFloat(TEXT("r.Shadow.DistanceScale"));

    if (MaxShadowCascades <= 0) {
        return 0.0f;
    }

    float Scale = FMath::Clamp(CVar->GetValueOnRenderThread(), 0.0f, 2.0f);
    ...
}


the DistanceScale is clamped to 2.

To disable CSM, check here HowTo/CascadedShadow.