Skip to content

Commit 7990c00

Browse files
committed
MHRise: Fix TemporalUpscaler + partial fix for VR
1 parent 1f6fca2 commit 7990c00

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

shared/sdk/Renderer.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -1423,6 +1423,8 @@ namespace detail {
14231423
#if TDB_VER >= 71
14241424
#if defined(SF6) || defined(DD2)
14251425
constexpr auto rtv_size = 0x98;
1426+
#elif defined(MHRISE)
1427+
constexpr auto rtv_size = 0x88;
14261428
#else
14271429
constexpr auto rtv_size = 0x98 - sizeof(void*);
14281430
#endif
@@ -1642,6 +1644,7 @@ RECamera* layer::Scene::get_main_camera_if_possible() const {
16421644
L"DefaultCamera",
16431645
L"Camera_mainmenu",
16441646
L"Camera_cp7mainmenu",
1647+
L"SnowCamera", // MHRise
16451648
};
16461649

16471650
for (const auto& camera_name : camera_names) {

shared/sdk/Renderer.hpp

+6
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@ class Texture : public RenderResource {
103103
// So because this discrepancy in SF6 is > 8 bytes (which is how much was added to RenderResource), trying to automate this
104104
// is a bit trickier so we can look into this later, and just hardcode it for now.
105105
static constexpr inline auto s_d3d12_resource_offset = 0xB8;
106+
#elif defined(MHRISE)
107+
static constexpr inline auto s_d3d12_resource_offset = 0x98; // WHAT THE HECK!!!
106108
#else
107109
static constexpr inline auto s_d3d12_resource_offset = 0xA0;
108110
#endif
@@ -413,8 +415,12 @@ class PrepareOutput : public sdk::renderer::RenderLayer {
413415
#if TDB_VER >= 73
414416
static constexpr inline auto s_output_state_offset = 0x118;
415417
#elif TDB_VER >= 71
418+
#ifdef MHRISE
419+
static constexpr inline auto s_output_state_offset = 0xF8;
420+
#else
416421
// verify for other games, this is for RE4
417422
static constexpr inline auto s_output_state_offset = 0x108;
423+
#endif
418424
#elif TDB_VER >= 69
419425
static constexpr inline auto s_output_state_offset = 0xF8;
420426
#else

0 commit comments

Comments
 (0)