mirror of
https://github.com/optiscaler/OptiScaler.git
synced 2026-05-04 16:50:37 +00:00
now cas sharpness follows dlss sharpness value
with ini it can be overriden
This commit is contained in:
@@ -51,6 +51,7 @@ void Config::Reload()
|
||||
|
||||
// CAS
|
||||
CasEnabled = readBool("CAS", "Enabled");
|
||||
CasOverrideSharpness = readBool("CAS", "OverrideSharpness");
|
||||
CasSharpness = readFloat("CAS", "Sharpness");
|
||||
ColorSpaceConversion = readInt("CAS", "ColorSpaceConversion");
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@ public:
|
||||
// CAS
|
||||
std::optional<bool> CasEnabled;
|
||||
std::optional<int> ColorSpaceConversion;
|
||||
std::optional<bool> CasOverrideSharpness;
|
||||
std::optional<float> CasSharpness;
|
||||
|
||||
|
||||
|
||||
+11
-1
@@ -392,7 +392,7 @@ class FeatureContext
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CasDispatch(ID3D12CommandList* commandList, ID3D12Resource* input, ID3D12Resource* output)
|
||||
bool CasDispatch(ID3D12CommandList* commandList, const NGXParameters* initParams, ID3D12Resource* input, ID3D12Resource* output)
|
||||
{
|
||||
spdlog::debug("FeatureContext::CasDispatch Start!");
|
||||
|
||||
@@ -405,6 +405,16 @@ class FeatureContext
|
||||
FfxCasDispatchDescription dispatchParameters = {};
|
||||
dispatchParameters.commandList = ffxGetCommandListDX12(commandList);
|
||||
dispatchParameters.renderSize = { DisplayWidth, DisplayHeight };
|
||||
|
||||
if (initParams->Get(NVSDK_NGX_Parameter_Sharpness, &casSharpness) != NVSDK_NGX_Result_Success ||
|
||||
CyberXessContext::instance()->MyConfig->CasOverrideSharpness.value_or(false))
|
||||
{
|
||||
casSharpness = CyberXessContext::instance()->MyConfig->CasSharpness.value_or(0.4);
|
||||
|
||||
if (casSharpness > 1 || casSharpness < 0)
|
||||
casSharpness = 0.4f;
|
||||
}
|
||||
|
||||
dispatchParameters.sharpness = casSharpness;
|
||||
|
||||
dispatchParameters.color = ffxGetResourceDX12(input, GetFfxResourceDescriptionDX12(input), nullptr, FFX_RESOURCE_STATE_PIXEL_COMPUTE_READ);
|
||||
|
||||
@@ -40,6 +40,8 @@ BuildPipelines=auto
|
||||
[CAS]
|
||||
;Enables CAS shapening - Default false
|
||||
Enabled=auto
|
||||
;Override DLSS sharpness paramater - Default false
|
||||
OverrideSharpness=auto
|
||||
;Strength of sharpening, value range between 0.0 and 1.0 - Default 0.4
|
||||
Sharpness=auto
|
||||
;Color space conversion for input and output
|
||||
|
||||
Reference in New Issue
Block a user