From 63387a081abc5df198c8448dff7324a0d51ec539 Mon Sep 17 00:00:00 2001 From: Tim <15017472+doodlum@users.noreply.github.com> Date: Tue, 11 Mar 2025 12:45:54 +0000 Subject: [PATCH 1/4] feat: frame pacing tuning --- src/FidelityFX.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/FidelityFX.cpp b/src/FidelityFX.cpp index c2791007cf..5b3bafb151 100644 --- a/src/FidelityFX.cpp +++ b/src/FidelityFX.cpp @@ -61,6 +61,16 @@ void FidelityFX::Present(bool a_useFrameGeneration) auto HUDLessColor = upscaling->HUDLessBufferShared12.get(); auto depth = upscaling->depthBufferShared12.get(); auto motionVectors = upscaling->motionVectorBufferShared12.get(); + + FfxApiSwapchainFramePacingTuning framePacingTuning{ 0.1f, 0.1f, true, 2, false }; + + ffx::ConfigureDescFrameGenerationSwapChainKeyValueDX12 framePacingTuningParameters{}; + framePacingTuningParameters.key = FFX_API_CONFIGURE_FG_SWAPCHAIN_KEY_FRAMEPACINGTUNING; + framePacingTuningParameters.ptr = &framePacingTuning; + + if (ffx::Configure(swapChainContext, framePacingTuningParameters) != ffx::ReturnCode::Ok) { + logger::critical("[FidelityFX] Failed to configure frame pacing tuning!"); + } ffx::ConfigureDescFrameGeneration configParameters{}; From 287d90429d45ff2e211609d268f1d0128cf2daa3 Mon Sep 17 00:00:00 2001 From: Tim <15017472+doodlum@users.noreply.github.com> Date: Tue, 11 Mar 2025 12:46:14 +0000 Subject: [PATCH 2/4] fix: low frame rate detection --- src/Hooks.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Hooks.cpp b/src/Hooks.cpp index 4b5203c3fa..ccaf420549 100644 --- a/src/Hooks.cpp +++ b/src/Hooks.cpp @@ -344,7 +344,7 @@ HRESULT WINAPI hk_D3D11CreateDeviceAndSwapChain( shouldProxy = false; } - upscaling->lowRefreshRate = refreshRate < 120; + upscaling->lowRefreshRate = refreshRate < 119; upscaling->isWindowed = pSwapChainDesc->Windowed; const D3D_FEATURE_LEVEL featureLevel = D3D_FEATURE_LEVEL_11_1; From 66a279dd22225af12fd4fbc75a8862009dac4eb2 Mon Sep 17 00:00:00 2001 From: doodlum Date: Tue, 11 Mar 2025 12:48:10 +0000 Subject: [PATCH 3/4] =?UTF-8?q?style:=20=F0=9F=8E=A8=20apply=20clang-forma?= =?UTF-8?q?t=20changes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/FidelityFX.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/FidelityFX.cpp b/src/FidelityFX.cpp index 5b3bafb151..cc0d6d183e 100644 --- a/src/FidelityFX.cpp +++ b/src/FidelityFX.cpp @@ -61,7 +61,7 @@ void FidelityFX::Present(bool a_useFrameGeneration) auto HUDLessColor = upscaling->HUDLessBufferShared12.get(); auto depth = upscaling->depthBufferShared12.get(); auto motionVectors = upscaling->motionVectorBufferShared12.get(); - + FfxApiSwapchainFramePacingTuning framePacingTuning{ 0.1f, 0.1f, true, 2, false }; ffx::ConfigureDescFrameGenerationSwapChainKeyValueDX12 framePacingTuningParameters{}; @@ -70,7 +70,7 @@ void FidelityFX::Present(bool a_useFrameGeneration) if (ffx::Configure(swapChainContext, framePacingTuningParameters) != ffx::ReturnCode::Ok) { logger::critical("[FidelityFX] Failed to configure frame pacing tuning!"); - } + } ffx::ConfigureDescFrameGeneration configParameters{}; From d274879f1a821dc89552e1eacf8959d85daae102 Mon Sep 17 00:00:00 2001 From: Tim <15017472+doodlum@users.noreply.github.com> Date: Tue, 11 Mar 2025 12:48:31 +0000 Subject: [PATCH 4/4] chore: bump version --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2080236029..b749feff26 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.21) project( CommunityShaders - VERSION 1.2.0 + VERSION 1.2.1 LANGUAGES CXX )