Skip to content

Commit

Permalink
Move reflection tweak code from shader fixes to shaders.ixx (#664)
Browse files Browse the repository at this point in the history
  • Loading branch information
sTc2201 authored Dec 21, 2024
1 parent 53ddf51 commit 6f30bd7
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions source/shaders.ixx
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit 6f30bd7

Please sign in to comment.