From 389faf3b65564b2fadde441b73758a65bb224d9c Mon Sep 17 00:00:00 2001 From: Nico de Poel Date: Sun, 23 Mar 2025 13:58:54 +0100 Subject: [PATCH] Minor fixes (clearing auto-exposure to 1e8f achieves faster convergence but might cause issues with OpenGL on Nvidia, keep an eye on this!) --- .../Runtime/Effects/Upscaling/ASR/Runtime/AsrContext.cs | 2 +- .../Runtime/Effects/Upscaling/ASR/Runtime/AsrResources.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/ASR/Runtime/AsrContext.cs b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/ASR/Runtime/AsrContext.cs index 1ef2b01..9bd1cc0 100644 --- a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/ASR/Runtime/AsrContext.cs +++ b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/ASR/Runtime/AsrContext.cs @@ -186,7 +186,7 @@ namespace ArmASR // Auto exposure always used to track luma changes in locking logic commandBuffer.SetRenderTarget(_resources.AutoExposure); - commandBuffer.ClearRenderTarget(false, true, new Color(0f, 1f, 0f, 0f)); + commandBuffer.ClearRenderTarget(false, true, new Color(0f, 1e8f, 0f, 0f)); // Reset atomic counter to 0 commandBuffer.SetRenderTarget(_resources.SpdAtomicCounter); diff --git a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/ASR/Runtime/AsrResources.cs b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/ASR/Runtime/AsrResources.cs index c2eeb65..1d9fd89 100644 --- a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/ASR/Runtime/AsrResources.cs +++ b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/ASR/Runtime/AsrResources.cs @@ -114,7 +114,7 @@ namespace ArmASR if (isBalancedOrPerformance) { // Resources FSR2_InternalReactive1/2: FFXM_RESOURCE_USAGE_RENDERTARGET, FFXM_SURFACE_FORMAT_R8_SNORM, FFXM_RESOURCE_FLAGS_NONE - CreateDoubleBufferedResource(InternalReactive, "ASR_InternalReactive", contextDescription.DisplaySize, GraphicsFormat.R8_SNorm); // TODO: R8_SNorm *might* be a problem? + CreateDoubleBufferedResource(InternalReactive, "ASR_InternalReactive", contextDescription.DisplaySize, GraphicsFormat.R8_SNorm); } else // Quality preset specific { @@ -169,7 +169,7 @@ namespace ArmASR public static void DestroyAliasableResources(CommandBuffer commandBuffer) { - // Release all of the aliasable resources used this frame + // Release all the aliasable resources used this frame commandBuffer.ReleaseTemporaryRT(AsrShaderIDs.UavReconstructedPrevNearestDepth); commandBuffer.ReleaseTemporaryRT(AsrShaderIDs.UavDilatedDepth); commandBuffer.ReleaseTemporaryRT(AsrShaderIDs.UavLockInputLuma);