Make Nukem's the default Nvngx FG replacement

This commit is contained in:
FakeMichau committed 2026-09-16 23:14:05 +02:00
1 parent b52cf663d6
commit 2e5a877028
5 files changed
+38 -7

No files matched your search

+1 -1
View File
@@ -48,7 +48,7 @@ FGOutput=auto
; Arturs - requires dlss-enabler-headless.dll, FSR 3 MFG
; FFX - requires amd_fidelityfx_dx12.dll OR amd_fidelityfx_loader_dx12.dll + amd_fidelityfx_framegeneration_dx12.dll, FSRFG 3 or 4
; Combo - requires the same as FFX AND Arturs, uses FFX for middle frames and Enabler for the rest. Allow for combining FSR 4 FG and Enabler in 4x and 6x modes
; None, Nukems, Arturs, FFX, Combo - Default (auto) is None
; None, Nukems, Arturs, FFX, Combo - Default (auto) is Nukems
FGNvngxReplacement=auto
; Frametime source, would affect frame pacing
+1 -1
View File
@@ -512,7 +512,7 @@ class Config
// Frame Generation
CustomOptional<FGInput> FGInput { FGInput::NoFG };
CustomOptional<FGOutput> FGOutput { FGOutput::NoFG };
CustomOptional<FGNvngxReplacement> FGNvngxReplacement { FGNvngxReplacement::None };
CustomOptional<FGNvngxReplacement> FGNvngxReplacement { FGNvngxReplacement::Nukems };
CustomOptional<bool> FGDrawUIOverFG { false };
CustomOptional<bool> FGUIPremultipliedAlpha { true };
CustomOptional<bool> FGDisableHudless { false };
+5 -5
View File
@@ -3202,18 +3202,18 @@ void MenuCommon::RenderFrameGenerationSelection(RenderMenuContext& ctx)
// DLSSG output requirements
auto constexpr dlssgOutputIndex = (uint32_t) FGOutput::DLSSG;
const bool supportsDlssg = primaryGpu.nvidiaArchInfo.architecture_id >= NV_GPU_ARCHITECTURE_AD100;
const bool maySupportDlssg = primaryGpu.vendorId == VendorId::Nvidia;
const bool hasDlssgReplacement =
state.nukemsFgFileAvailable || state.artursFgFileAvailable || FfxApiProxy::IsFGReady(false);
if (!supportsDlssg && hasDlssgReplacement)
if (!maySupportDlssg && hasDlssgReplacement)
{
outputOptions[dlssgOutputIndex].tooltip =
"No real DLSSG, unsupported hardware\nOnly Nvngx FG replacements available";
}
outputOptions[dlssgOutputIndex].set_disabled(state.swapchainApi == API::Vulkan, "Unsupported API");
outputOptions[dlssgOutputIndex].set_disabled(!supportsDlssg && !hasDlssgReplacement,
outputOptions[dlssgOutputIndex].set_disabled(!maySupportDlssg && !hasDlssgReplacement,
"Unsupported hardware and no replacements");
// For that one case of DX11 DLSSG
@@ -3292,7 +3292,7 @@ void MenuCommon::RenderFrameGenerationSelection(RenderMenuContext& ctx)
}
auto constexpr fgNvngxNoneIndex = (uint32_t) FGNvngxReplacement::None;
nvngxOptions[fgNvngxNoneIndex].set_disabled(!supportsDlssg, "Unsupported hardware");
nvngxOptions[fgNvngxNoneIndex].set_disabled(!maySupportDlssg, "Unsupported hardware");
if (replaceFgOutputWithNvngx)
{
@@ -3358,7 +3358,7 @@ void MenuCommon::RenderFrameGenerationSelection(RenderMenuContext& ctx)
}
// Try to avoid having None selected when the gpu doesn't support DLSSG + some fallbacks
if (!supportsDlssg && (replaceFgOutputWithNvngx || showNvngxFgDowndown) &&
if (!maySupportDlssg && (replaceFgOutputWithNvngx || showNvngxFgDowndown) &&
config->FGNvngxReplacement.value_or_default() == FGNvngxReplacement::None)
{
if (state.nukemsFgFileAvailable)
+10
View File
@@ -190,6 +190,16 @@ std::vector<GpuInformation> IdentifyGpu::checkGpuInfo()
if (gpuInfo.vendorId == VendorId::Nvidia)
{
queryNvapi(gpuInfo);
// Attempt to use real DLSSG by default on Ada+
if (gpuInfo.nvidiaArchInfo.architecture_id >= NV_GPU_ARCHITECTURE_AD100 &&
!Config::Instance()->FGNvngxReplacement.has_value())
{
Config::Instance()->FGNvngxReplacement = FGNvngxReplacement::None;
if (State::Instance().activeFgOutput == FGOutput::DLSSG)
State::Instance().activeFgNvngx = FGNvngxReplacement::None;
}
}
}
+21
View File
@@ -360,6 +360,27 @@ class StreamlineProxy
auto initResult = StreamlineProxy::Init()(pref, sl::kSDKVersion);
sl::AdapterInfo adapterInfo {};
if (StreamlineProxy::IsFeatureSupported()(sl::kFeatureDLSS_G, adapterInfo) != sl::Result::eOk)
{
if (State::Instance().activeFgNvngx == FGNvngxReplacement::None)
{
Config::Instance()->FGNvngxReplacement = FGNvngxReplacement::Nukems;
Config::Instance()->SaveIni();
MessageBoxW(NULL,
L"You've tried to use real DLSSG, but it's not supported\n"
"Opti will try to use a replacement, restart the game",
L"No DLSSG Support", MB_ICONWARNING | MB_OK);
std::exit(1);
}
else
{
LOG_ERROR("FG Nvngx replacement was selected but SL failed to init DLSSG");
}
}
State::EnableChecks(owner);
if (initResult == sl::Result::eOk)