From 9d2f20786ff468827eb0ee4dcf6c3bd6a1351804 Mon Sep 17 00:00:00 2001 From: cdozdil Date: Sun, 2 Mar 2025 23:53:29 +0300 Subject: [PATCH] Added FeaturePath option for DLSS --- OptiScaler.ini | 45 +++++++++++-------------------------------- OptiScaler/Config.cpp | 2 ++ OptiScaler/Config.h | 1 + 3 files changed, 14 insertions(+), 34 deletions(-) diff --git a/OptiScaler.ini b/OptiScaler.ini index 2785e531..9dbdc431 100644 --- a/OptiScaler.ini +++ b/OptiScaler.ini @@ -14,7 +14,10 @@ Dx12Upscaler=auto VulkanUpscaler=auto + +; ------------------------------------------------------- [FrameGen] +; ------------------------------------------------------- ; Select the FG type to be used ; optifg - requires amd_fidelityfx_dx12.dll ; nukems - requires dlssg_to_fsr3_amd_is_better.dll, AMD/Intel GPU users need to add fakenvapi as well @@ -22,6 +25,7 @@ VulkanUpscaler=auto FGType=auto + ; ------------------------------------------------------- [OptiFG] ; ------------------------------------------------------- @@ -160,7 +164,6 @@ FPTWaitForSingleObjectOnFence=auto - ; ------------------------------------------------------- [Inputs] ; ------------------------------------------------------- @@ -196,7 +199,6 @@ Ffx=auto - ; ------------------------------------------------------- [Framerate] ; ------------------------------------------------------- @@ -207,8 +209,6 @@ FramerateLimit=auto - - ; ------------------------------------------------------- [XeSS] ; ------------------------------------------------------- @@ -231,8 +231,6 @@ LibraryPath=auto - - ; ------------------------------------------------------- [FSR] ; ------------------------------------------------------- @@ -281,8 +279,6 @@ DlssReactiveMaskBias=auto - - ; ------------------------------------------------------- [DLSS] ; ------------------------------------------------------- @@ -294,6 +290,13 @@ Enabled=auto ; Default (auto) is path defined in registry LibraryPath=auto +; Path of streamline/nvngx_dlss.dll folder +; Which will be used on initing nvngx api +; for example .\streamline +; Default (auto) is OptiScaler dll path +FeaturePath=auto + + ; Path of custom nvngx_dlss.dll ; Default (auto) is means override disabled NVNGX_DLSS_Path=auto @@ -317,7 +320,6 @@ RenderPresetUltraPerformance=auto - ; ------------------------------------------------------- [Nukems] ; ------------------------------------------------------- @@ -328,7 +330,6 @@ MakeDepthCopy=auto - ; ------------------------------------------------------- [Menu] ; ------------------------------------------------------- @@ -388,8 +389,6 @@ FpsOverlayAlpha=auto - - ; ------------------------------------------------------- [Spoofing] ; ------------------------------------------------------- @@ -453,7 +452,6 @@ LoadReshade=auto - ; ------------------------------------------------------- [NvApi] ; ------------------------------------------------------- @@ -468,7 +466,6 @@ NvapiDllPath=auto - ; ------------------------------------------------------- [Dx11withDx12] ; ------------------------------------------------------- @@ -503,8 +500,6 @@ DontUseNTShared=auto - - ; ------------------------------------------------------- [Hooks] ; ------------------------------------------------------- @@ -515,8 +510,6 @@ HookOriginalNvngxOnly=auto - - ; ------------------------------------------------------- [Sharpness] ; ------------------------------------------------------- @@ -530,8 +523,6 @@ Sharpness=auto - - ; ------------------------------------------------------- [OutputScaling] ; ------------------------------------------------------- @@ -554,8 +545,6 @@ Downscaler=auto - - ; ------------------------------------------------------- [CAS] ; ------------------------------------------------------- @@ -587,8 +576,6 @@ MotionSharpnessDebug=auto - - ; ------------------------------------------------------- [Log] ; ------------------------------------------------------- @@ -631,8 +618,6 @@ LogAsyncThreads=auto - - ; ------------------------------------------------------- [InitFlags] ; ------------------------------------------------------- @@ -663,7 +648,6 @@ DisableReactiveMask=auto - ; ------------------------------------------------------- [UpscaleRatio] ; ------------------------------------------------------- @@ -677,8 +661,6 @@ UpscaleRatioOverrideValue=auto - - ; ------------------------------------------------------- [QualityOverrides] ; ------------------------------------------------------- @@ -704,8 +686,6 @@ QualityRatioUltraPerformance=auto - - ; ------------------------------------------------------- [DRS] ; ------------------------------------------------------- @@ -719,7 +699,6 @@ DrsMaxOverrideEnabled=auto - ; ------------------------------------------------------- [HDR] ; ------------------------------------------------------- @@ -733,8 +712,6 @@ UseHDR10=auto - - ; ------------------------------------------------------- [Hotfix] ; ------------------------------------------------------- diff --git a/OptiScaler/Config.cpp b/OptiScaler/Config.cpp index 43ef1fc5..59ef9414 100644 --- a/OptiScaler/Config.cpp +++ b/OptiScaler/Config.cpp @@ -131,6 +131,7 @@ bool Config::Reload(std::filesystem::path iniPath) // Don't enable again if set false because of no nvngx found DLSSEnabled.set_from_config(readBool("DLSS", "Enabled")); NvngxPath.set_from_config(readWString("DLSS", "LibraryPath")); + DLSSFeaturePath.set_from_config(readWString("DLSS", "FeaturePath")); NVNGX_DLSS_Library.set_from_config(readWString("DLSS", "NVNGX_DLSS_Path")); RenderPresetOverride.set_from_config(readBool("DLSS", "RenderPresetOverride")); @@ -615,6 +616,7 @@ bool Config::SaveIni() { ini.SetValue("DLSS", "Enabled", GetBoolValue(Instance()->DLSSEnabled.value_for_config()).c_str()); ini.SetValue("DLSS", "LibraryPath", wstring_to_string(Instance()->NvngxPath.value_for_config_or(L"auto")).c_str()); + ini.SetValue("DLSS", "FeaturePath", wstring_to_string(Instance()->DLSSFeaturePath.value_for_config_or(L"auto")).c_str()); ini.SetValue("DLSS", "NVNGX_DLSS_Library", wstring_to_string(Instance()->NVNGX_DLSS_Library.value_for_config_or(L"auto")).c_str()); ini.SetValue("DLSS", "RenderPresetOverride", GetBoolValue(Instance()->RenderPresetOverride.value_for_config()).c_str()); ini.SetValue("DLSS", "RenderPresetForAll", GetIntValue(Instance()->RenderPresetForAll.value_for_config()).c_str()); diff --git a/OptiScaler/Config.h b/OptiScaler/Config.h index 44c58429..606556cb 100644 --- a/OptiScaler/Config.h +++ b/OptiScaler/Config.h @@ -155,6 +155,7 @@ public: CustomOptional DLSSEnabled{ true }; CustomOptional NvngxPath; CustomOptional NVNGX_DLSS_Library; + CustomOptional DLSSFeaturePath; CustomOptional RenderPresetOverride{ false }; CustomOptional RenderPresetForAll{ 0 }; CustomOptional RenderPresetDLAA{ 0 };