Browse Source

Release FSR2 resources when it's not in use. This frees up VRAM but also ensures that the mipmap bias is undone when switching to another AA option.

stable
Nico de Poel 3 years ago
parent
commit
1e2e8b6a12
  1. 5
      Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/PostProcessLayer.cs

5
Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/PostProcessLayer.cs

@ -626,6 +626,11 @@ namespace UnityEngine.Rendering.PostProcessing
superResolution.ConfigureCameraViewport(context);
context.SetRenderSize(superResolution.renderSize);
}
else
{
// Ensure all of FSR2's resources are released when it's not in use
superResolution.Release();
}
context.command = m_LegacyCmdBufferOpaque;
TextureLerper.instance.BeginFrame(context);

Loading…
Cancel
Save