added some logging, exposure scale. start using nvidia nv params for dlss again. added render preset hint checks

This commit is contained in:
cdozdil
2024-06-10 21:40:20 +03:00
parent d7d9370dca
commit 6e736e3e0d
2 changed files with 24 additions and 2 deletions
+23
View File
@@ -578,6 +578,11 @@ void DLSSFeature::ProcessEvaluateParams(const NVSDK_NGX_Parameter* InParameters)
if (InParameters->Get(NVSDK_NGX_Parameter_DLSS_Indicator_Invert_Y_Axis, &uintValue) == NVSDK_NGX_Result_Success)
Parameters->Set(NVSDK_NGX_Parameter_DLSS_Indicator_Invert_Y_Axis, uintValue);
if (InParameters->Get(NVSDK_NGX_Parameter_DLSS_Exposure_Scale, &floatValue) == NVSDK_NGX_Result_Success)
Parameters->Set(NVSDK_NGX_Parameter_DLSS_Exposure_Scale, floatValue);
else
Parameters->Set(NVSDK_NGX_Parameter_DLSS_Exposure_Scale, 1.0f);
if (InParameters->Get(NVSDK_NGX_Parameter_FrameTimeDeltaInMsec, &floatValue) == NVSDK_NGX_Result_Success)
Parameters->Set(NVSDK_NGX_Parameter_FrameTimeDeltaInMsec, floatValue);
}
@@ -743,6 +748,24 @@ void DLSSFeature::ProcessInitParams(const NVSDK_NGX_Parameter* InParameters)
RenderPresetUltraPerformance = Config::Instance()->RenderPresetUltraPerformance.value_or(RenderPresetUltraPerformance);
}
if (RenderPresetDLAA < 0 || RenderPresetDLAA > 5)
RenderPresetDLAA = 0;
if (RenderPresetUltraQuality < 0 || RenderPresetUltraQuality > 5)
RenderPresetUltraQuality = 0;
if (RenderPresetQuality < 0 || RenderPresetQuality > 5)
RenderPresetQuality = 0;
if (RenderPresetBalanced < 0 || RenderPresetBalanced > 5)
RenderPresetBalanced = 0;
if (RenderPresetPerformance < 0 || RenderPresetPerformance > 5)
RenderPresetPerformance = 0;
if (RenderPresetUltraPerformance < 0 || RenderPresetUltraPerformance > 5)
RenderPresetUltraPerformance = 0;
Parameters->Set(NVSDK_NGX_Parameter_DLSS_Hint_Render_Preset_DLAA, RenderPresetDLAA);
Parameters->Set(NVSDK_NGX_Parameter_DLSS_Hint_Render_Preset_UltraQuality, RenderPresetUltraQuality);
Parameters->Set(NVSDK_NGX_Parameter_DLSS_Hint_Render_Preset_Quality, RenderPresetQuality);
+1 -2
View File
@@ -2,7 +2,6 @@
#include "../IFeature.h"
#include "../../pch.h"
#include "../../NVNGX_Parameter.h"
#include <string>
typedef uint32_t(*PFN_NVSDK_NGX_GetSnippetVersion)(void);
@@ -14,7 +13,7 @@ private:
inline static HMODULE _nvngx = nullptr;
protected:
NVSDK_NGX_Parameter* Parameters = GetNGXParameters("DLSS");
NVSDK_NGX_Parameter* Parameters = nullptr;
NVSDK_NGX_Handle _dlssHandle = {};
NVSDK_NGX_Handle* _p_dlssHandle = nullptr;
inline static bool _dlssInited = false;