From 6f30bd773cd4ea4e08fe93669af31372ff196126 Mon Sep 17 00:00:00 2001 From: sTc2201 <41953894+sTc2201@users.noreply.github.com> Date: Sat, 21 Dec 2024 17:49:28 +0100 Subject: [PATCH] Move reflection tweak code from shader fixes to shaders.ixx (#664) --- source/shaders.ixx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/source/shaders.ixx b/source/shaders.ixx index c4ae3916..f15a7b48 100644 --- a/source/shaders.ixx +++ b/source/shaders.ixx @@ -150,6 +150,13 @@ public: } } + // Override reflection multiplier that resulted in weaker reflections on PC, a fix/workaround used to be in place on the shader side, move it in here instead. + { + static float dw103F984 = 1.0f; // 0.6f -> 1.0f + auto pattern = find_pattern("F3 0F 10 05 ? ? ? ? F3 0F 59 C1 51 F3 0F 11 04 24 E8", "F3 0F 10 0D ? ? ? ? 51 F3 0F 59 C8 F3 0F 11 0C 24 E8"); + injector::WriteMemory(pattern.get_first(4), &dw103F984, true); + } + // Restore console car reflections and dirt level settings. Any car on console could have dirt when they would spawn while on PC some cars _always_ spawn fully cleaned. if (bConsoleCarReflectionsAndDirt) {