Add toggle for water projection offset. Potentially fixes #77

This commit is contained in:
Lurs
2026-03-24 11:19:58 +01:00
parent 793e09b95c
commit 8b66a4e648
5 changed files with 18 additions and 2 deletions
+9 -1
View File
@@ -31,6 +31,9 @@
#include "JSystem/JKernel/JKRSolidHeap.h"
#include <cstdlib>
#include <cstring>
#if TARGET_PC
#include "dusk/imgui/ImGuiConsole.hpp"
#endif
static void GxXFog_set();
@@ -11376,7 +11379,12 @@ void dKy_bg_MAxx_proc(void* bg_model_p) {
Mtx sp1D8;
if (mat_name[6] == '2') {
C_MTXLightPerspective(sp1D8, dComIfGd_getView()->fovy,
camera_p->view.aspect, 1.0f, 1.0f, -0.01f, 0.0f);
camera_p->view.aspect, 1.0f, 1.0f,
#if TARGET_PC
dusk::g_imguiConsole.isWaterProjectionOffsetEnabled() ? -0.01f : 0.0f, 0.0f);
#else
-0.01f, 0.0f);
#endif
} else {
C_MTXLightPerspective(sp1D8, dComIfGd_getView()->fovy,
camera_p->view.aspect, 0.49f, -0.49f, 0.5f, 0.5f);