Skip to content

Commit 2995572

Browse files
authored
fix(upscaling): fix minor upscaling issues (#1536)
1 parent 19c6f4e commit 2995572

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/Features/Upscaling.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT(
1919
frameLimitMode,
2020
frameGenerationMode,
2121
frameGenerationForceEnable,
22-
streamlineLogLevel);
22+
streamlineLogLevel,
23+
sharpnessFSR,
24+
sharpnessDLSS);
2325

2426
decltype(&D3D11CreateDeviceAndSwapChain) ptrD3D11CreateDeviceAndSwapChainUpscaling;
2527

src/State.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -762,7 +762,9 @@ void State::UpdateSharedData([[maybe_unused]] bool a_inWorld, [[maybe_unused]] b
762762
auto upscaleMethod = upscaling.GetUpscaleMethod();
763763
if (temporal && upscaleMethod != Upscaling::UpscaleMethod::kTAA) {
764764
auto renderSize = Util::ConvertToDynamic(screenSize, true);
765-
data.MipBias = std::log2f(renderSize.x / screenSize.x) - 1.0f;
765+
data.MipBias = std::log2f(renderSize.x / screenSize.x);
766+
if (upscaleMethod == Upscaling::UpscaleMethod::kDLSS)
767+
data.MipBias -= 1.0f;
766768
} else {
767769
data.MipBias = 0;
768770
}

0 commit comments

Comments
 (0)