mirror of
https://github.com/optiscaler/OptiScaler.git
synced 2026-05-29 21:13:14 +00:00
added some logging, exposure scale. start using nvidia nv params for dlss again. added render preset hint checks
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user