Skip to content

Commit

Permalink
MHRise: Fix TemporalUpscaler + partial fix for VR
Browse files Browse the repository at this point in the history
  • Loading branch information
praydog committed Oct 21, 2024
1 parent 1f6fca2 commit 7990c00
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions shared/sdk/Renderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1423,6 +1423,8 @@ namespace detail {
#if TDB_VER >= 71
#if defined(SF6) || defined(DD2)
constexpr auto rtv_size = 0x98;
#elif defined(MHRISE)
constexpr auto rtv_size = 0x88;
#else
constexpr auto rtv_size = 0x98 - sizeof(void*);
#endif
Expand Down Expand Up @@ -1642,6 +1644,7 @@ RECamera* layer::Scene::get_main_camera_if_possible() const {
L"DefaultCamera",
L"Camera_mainmenu",
L"Camera_cp7mainmenu",
L"SnowCamera", // MHRise
};

for (const auto& camera_name : camera_names) {
Expand Down
6 changes: 6 additions & 0 deletions shared/sdk/Renderer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ class Texture : public RenderResource {
// So because this discrepancy in SF6 is > 8 bytes (which is how much was added to RenderResource), trying to automate this
// is a bit trickier so we can look into this later, and just hardcode it for now.
static constexpr inline auto s_d3d12_resource_offset = 0xB8;
#elif defined(MHRISE)
static constexpr inline auto s_d3d12_resource_offset = 0x98; // WHAT THE HECK!!!
#else
static constexpr inline auto s_d3d12_resource_offset = 0xA0;
#endif
Expand Down Expand Up @@ -413,8 +415,12 @@ class PrepareOutput : public sdk::renderer::RenderLayer {
#if TDB_VER >= 73
static constexpr inline auto s_output_state_offset = 0x118;
#elif TDB_VER >= 71
#ifdef MHRISE
static constexpr inline auto s_output_state_offset = 0xF8;
#else
// verify for other games, this is for RE4
static constexpr inline auto s_output_state_offset = 0x108;
#endif
#elif TDB_VER >= 69
static constexpr inline auto s_output_state_offset = 0xF8;
#else
Expand Down

0 comments on commit 7990c00

Please sign in to comment.