Thanks to this thread, I was able to fix it by diffing it with UE5 source code. The fix is surprisingly easy. In “Engine\Source\Runtime\Renderer\Private\CompositionLighting\CompositionLighting.cpp”, function AddPostProcessingGTAOAllPasses(), change the following
if (bSpatialPass)
{
CurrentOutput =
AddGTAOSpatialFilter(
GraphBuilder,
View,
CommonParameters,
CommonParameters.SceneDepth,
CurrentOutput);
}
to
if (bSpatialPass)
{
CurrentOutput =
AddGTAOSpatialFilter(
GraphBuilder,
View,
CommonParameters,
HorizonSearchOutputs.Color,
CommonParameters.SceneDepth);
}
Hope that helps!