Reduce DDGI flickering in certain lighting scenarios

This commit is contained in:
Wojciech Figat
2022-07-26 13:18:09 +02:00
parent da616fc578
commit cfb98a39b0
2 changed files with 4 additions and 4 deletions

BIN
Content/Shaders/GI/DDGI.flax (Stored with Git LFS)

Binary file not shown.

View File

@@ -447,10 +447,10 @@ void CS_UpdateProbes(uint3 GroupThreadId : SV_GroupThreadID, uint3 GroupId : SV_
float3 irradianceDelta = result.rgb - previous;
float irradianceDeltaMax = Max3(abs(irradianceDelta));
float irradianceDeltaLen = length(irradianceDelta);
if (irradianceDeltaMax > 0.2f)
if (irradianceDeltaMax > 0.5f)
{
// Reduce history weight after significant lighting change
historyWeight = max(historyWeight - 0.9f, 0.0f);
historyWeight = historyWeight * 0.5f;
}
if (irradianceDeltaLen > 2.0f)
{