Browse Source

Reset atomic counter on any kind of reset, not just on first execution. Fixes black screen on Metal when doing a history reset.

master
Nico de Poel 3 years ago
parent
commit
e577240354
  1. 8
      Assets/Scripts/Core/Fsr2Context.cs

8
Assets/Scripts/Core/Fsr2Context.cs

@ -150,10 +150,6 @@ namespace FidelityFX
commandBuffer.ClearRenderTarget(false, true, Color.clear);
commandBuffer.SetRenderTarget(_resources.LockStatus[1]);
commandBuffer.ClearRenderTarget(false, true, Color.clear);
// Reset atomic counter to 0
commandBuffer.SetRenderTarget(_resources.SpdAtomicCounter);
commandBuffer.ClearRenderTarget(false, true, Color.clear);
}
int frameIndex = _resourceFrameIndex % 2;
@ -209,6 +205,10 @@ namespace FidelityFX
// Auto exposure always used to track luma changes in locking logic
commandBuffer.SetRenderTarget(_resources.AutoExposure);
commandBuffer.ClearRenderTarget(false, true, new Color(-1f, 1e8f, 0f, 0f));
// Reset atomic counter to 0
commandBuffer.SetRenderTarget(_resources.SpdAtomicCounter);
commandBuffer.ClearRenderTarget(false, true, Color.clear);
}
// Auto exposure

Loading…
Cancel
Save