From 548107bf1dbaee70f4788c99848af5c31aa43866 Mon Sep 17 00:00:00 2001 From: doodlum <15017472+doodlum@users.noreply.github.com> Date: Sun, 4 Jan 2026 00:48:48 +0000 Subject: [PATCH 1/3] perf(upscaling): make fDRClampOffset static --- src/Features/Upscaling.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Features/Upscaling.cpp b/src/Features/Upscaling.cpp index 6cd4ab770f..59846daeee 100644 --- a/src/Features/Upscaling.cpp +++ b/src/Features/Upscaling.cpp @@ -720,7 +720,7 @@ void Upscaling::ConfigureUpscaling(RE::BSGraphics::State* a_viewport) CheckResources(upscaleMethod); // The game defaults this to a non-zero value - auto fDRClampOffset = RE::GetINISetting("fDRClampOffset:Display"); + static auto fDRClampOffset = RE::GetINISetting("fDRClampOffset:Display"); fDRClampOffset->data.f = 0.0f; // Cache original TAA values for UI From e143bf3f078e916a8534e01e9c81c5bda912fc34 Mon Sep 17 00:00:00 2001 From: doodlum <15017472+doodlum@users.noreply.github.com> Date: Sun, 4 Jan 2026 00:49:39 +0000 Subject: [PATCH 2/3] chore: only call on dataloaded --- src/Features/Upscaling.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Features/Upscaling.cpp b/src/Features/Upscaling.cpp index 59846daeee..c7c9790bb2 100644 --- a/src/Features/Upscaling.cpp +++ b/src/Features/Upscaling.cpp @@ -389,6 +389,10 @@ void Upscaling::DataLoaded() { // Fix screenshots fix from Engine Fixes RE::GetINISetting("bUseTAA:Display")->data.b = false; + + // The game defaults this to a non-zero value + static auto fDRClampOffset = RE::GetINISetting("fDRClampOffset:Display"); + fDRClampOffset->data.f = 0.0f; } void Upscaling::Load() @@ -719,10 +723,6 @@ void Upscaling::ConfigureUpscaling(RE::BSGraphics::State* a_viewport) // Delete or create resources as necessary CheckResources(upscaleMethod); - // The game defaults this to a non-zero value - static auto fDRClampOffset = RE::GetINISetting("fDRClampOffset:Display"); - fDRClampOffset->data.f = 0.0f; - // Cache original TAA values for UI projectionPosScaleX = a_viewport->projectionPosScaleX; projectionPosScaleY = a_viewport->projectionPosScaleY; From e011abb2975377ad5cda9a620b9fcbb5fbb7bf2c Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sun, 4 Jan 2026 00:51:18 +0000 Subject: [PATCH 3/3] =?UTF-8?q?style:=20=F0=9F=8E=A8=20apply=20pre-commit.?= =?UTF-8?q?ci=20formatting?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Automated formatting by clang-format, prettier, and other hooks. See https://pre-commit.ci for details. --- src/Features/Upscaling.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Features/Upscaling.cpp b/src/Features/Upscaling.cpp index c7c9790bb2..4e926af7e9 100644 --- a/src/Features/Upscaling.cpp +++ b/src/Features/Upscaling.cpp @@ -389,7 +389,7 @@ void Upscaling::DataLoaded() { // Fix screenshots fix from Engine Fixes RE::GetINISetting("bUseTAA:Display")->data.b = false; - + // The game defaults this to a non-zero value static auto fDRClampOffset = RE::GetINISetting("fDRClampOffset:Display"); fDRClampOffset->data.f = 0.0f;