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 ) diff --git a/src/FidelityFX.cpp b/src/FidelityFX.cpp index c2791007cf..cc0d6d183e 100644 --- a/src/FidelityFX.cpp +++ b/src/FidelityFX.cpp @@ -62,6 +62,16 @@ void FidelityFX::Present(bool a_useFrameGeneration) 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{}; if (a_useFrameGeneration) { 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;