From 76772ec39edf0001a6cc0e83bc72208a19beecbe Mon Sep 17 00:00:00 2001 From: Stenzek Date: Sun, 17 Sep 2023 15:14:56 +1000 Subject: [PATCH] PostProcessing/FX: Fix incorrect RCP_BUFFER{WIDTH,HEIGHT} --- src/util/postprocessing_shader_fx.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/postprocessing_shader_fx.cpp b/src/util/postprocessing_shader_fx.cpp index 5fb4fb9e9..a42202b7a 100644 --- a/src/util/postprocessing_shader_fx.cpp +++ b/src/util/postprocessing_shader_fx.cpp @@ -326,8 +326,8 @@ bool PostProcessing::ReShadeFXShader::CreateModule(s32 buffer_width, s32 buffer_ pp.add_macro_definition("__RESHADE__", "50901"); pp.add_macro_definition("BUFFER_WIDTH", std::to_string(buffer_width)); // TODO: can we make these uniforms? pp.add_macro_definition("BUFFER_HEIGHT", std::to_string(buffer_height)); - pp.add_macro_definition("BUFFER_RCP_WIDTH", fmt::format("({}.0 / BUFFER_WIDTH)", buffer_width)); - pp.add_macro_definition("BUFFER_RCP_HEIGHT", fmt::format("({}.0 / BUFFER_HEIGHT)", buffer_height)); + pp.add_macro_definition("BUFFER_RCP_WIDTH", std::to_string(1.0f / static_cast(buffer_width))); + pp.add_macro_definition("BUFFER_RCP_HEIGHT", std::to_string(1.0f / static_cast(buffer_height))); switch (GetRenderAPI()) {