Skip to content

Commit

Permalink
FixCascadedShadowMapResolution test
Browse files Browse the repository at this point in the history
  • Loading branch information
ThirteenAG committed Aug 21, 2024
1 parent 1a87308 commit b082318
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 13 additions & 0 deletions source/fixes.ixx
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,19 @@ public:
injector::MakeNOP(pattern.get_first(6), 6, true);
}
}

if (true)
{
auto pattern = find_pattern("8B 0D ? ? ? ? 8D 54 24 0C 52 6A 20 FF 35 ? ? ? ? A3");
static auto dword_11A1B84 = *pattern.get_first<uint32_t*>(15);
static auto dword_11A1B80 = *pattern.get_first<uint32_t*>(26);

static auto FixCascadedShadowMapResolution = safetyhook::create_mid(pattern.get_first(0), [](SafetyHookContext& regs)
{
*dword_11A1B84 *= 2;
*dword_11A1B80 *= 2;
});
}
};
}
} Fixes;
2 changes: 1 addition & 1 deletion source/windowed.ixx
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ public:
bSkipWindowedCallback1 = false;
});

pattern = find_pattern("C6 05 ? ? ? ? ? FF 75 14", "C6 05 ? ? ? ? ? 8B 54 24 1C", "C6 05 ? ? ? ? ? FF 15 ? ? ? ? 5F");
pattern = find_pattern("C6 05 ? ? ? ? ? FF 75 14", "C6 05 ? ? ? ? ? 0F 94 05 ? ? ? ? FF 75 14", "C6 05 ? ? ? ? ? 8B 54 24 1C", "C6 05 ? ? ? ? ? FF 15 ? ? ? ? 5F");
static auto AltEnterHandlerHook = safetyhook::create_mid(pattern.get_first(),
[](SafetyHookContext& ctx)
{
Expand Down

0 comments on commit b082318

Please sign in to comment.