change scaling of saturate

This commit is contained in:
cdozdil
2025-02-02 13:44:31 +03:00
parent d4aeecd786
commit 39137a73bb
3 changed files with 11 additions and 4 deletions
+5 -2
View File
@@ -1520,7 +1520,10 @@ bool MenuCommon::RenderMenu()
// DLSSG Mod
if (State::Instance().api != DX11 && !State::Instance().isWorkingAsNvngx)
{
ImGui::SeparatorText("Frame Generation (DLSSG)");
SeparatorWithHelpMarker("Frame Generation (Nukem's DLSSG via FSR FG)", "DLSSG via Nukem's FSR-FG using dlss-to-fsr3 mod,\n"
"for using DLSS G in game by using\n"
"dlssg_to_fsr3_amd_is_better.dll file\n"
"for creating better DLSS G frame generation");
auto dlssgEnabled = Config::Instance()->DLSSGMod.value_or_default();
if (ImGui::Checkbox("DLSSG Enabled", &dlssgEnabled))
@@ -1532,7 +1535,7 @@ bool MenuCommon::RenderMenu()
else
Config::Instance()->FGUseFGSwapChain.reset();
}
ShowHelpMarker("These settings will become active on next boot!");
ShowHelpMarker("These settings will become active on next boot!\nTo use, select DLSS FG in-game.");
if (Config::Instance()->DLSSGMod.value_or_default() && !State::Instance().NukemsFilesAvailable)
ImGui::TextColored(ImVec4(1.f, 0.f, 0.f, 1.f), "Please put dlssg_to_fsr3_amd_is_better.dll next to OptiScaler");
+1 -1
View File
@@ -1 +1 @@
#define VER_BUILD_DATE "20250202_031121"
#define VER_BUILD_DATE "20250202_134423"
@@ -12,6 +12,9 @@ Texture2D<float> SourceTexture : register(t0);
// Output texture
RWTexture2D<float> DestinationTexture : register(u0);
//static const float maxFloatValue = 3.402823466e+38f; // FLT_MAX
static const float maxFloatValue = 10000.0f; // FLT_MAX
// Compute shader thread group size
[numthreads(16, 16, 1)]
void CSMain(uint3 dispatchThreadID : SV_DispatchThreadID)
@@ -21,9 +24,10 @@ void CSMain(uint3 dispatchThreadID : SV_DispatchThreadID)
// Load the pixel value from the source texture
float srcColor = SourceTexture.Load(int3(pixelCoord, 0));
float normalizedColor = srcColor / maxFloatValue;
// Write the pixel value to the destination texture
DestinationTexture[pixelCoord] = saturate(srcColor);
DestinationTexture[pixelCoord] = saturate(normalizedColor);
}
)";