mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-06-25 08:02:04 -04:00
Add toggle for water projection offset. Potentially fixes #77
This commit is contained in:
Vendored
+1
-1
Submodule extern/aurora updated: 156f9a65e3...d76b70fc72
+9
-1
@@ -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);
|
||||
|
||||
@@ -15,6 +15,7 @@ namespace dusk {
|
||||
void draw();
|
||||
|
||||
bool isBloomEnabled() { return m_menuGame.isBloomEnabled(); }
|
||||
bool isWaterProjectionOffsetEnabled() { return m_menuGame.isWaterProjectionOffsetEnabled(); }
|
||||
ImGuiMenuTools::CollisionViewSettings& getCollisionViewSettings() { return m_menuTools.getCollisionViewSettings(); }
|
||||
|
||||
static bool CheckMenuViewToggle(ImGuiKey key, bool& active);
|
||||
|
||||
@@ -23,6 +23,11 @@ namespace dusk {
|
||||
|
||||
if (ImGui::BeginMenu("Graphics")) {
|
||||
ImGui::Checkbox("Native Bloom", &m_graphicsSettings.m_enableBloom);
|
||||
ImGui::Checkbox("Water Projection Offset", &m_graphicsSettings.m_waterProjectionOffset);
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Adds GC-specific -0.01 transS offset\n"
|
||||
"that causes ~6px ghost artifacts in water reflections");
|
||||
}
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ namespace dusk {
|
||||
ImGuiMenuGame();
|
||||
void draw();
|
||||
bool isBloomEnabled() { return m_graphicsSettings.m_enableBloom; }
|
||||
bool isWaterProjectionOffsetEnabled() { return m_graphicsSettings.m_waterProjectionOffset; }
|
||||
|
||||
void windowInputViewer();
|
||||
void windowControllerConfig();
|
||||
@@ -35,6 +36,7 @@ namespace dusk {
|
||||
|
||||
struct {
|
||||
bool m_enableBloom = 1;
|
||||
bool m_waterProjectionOffset = false;
|
||||
} m_graphicsSettings;
|
||||
|
||||
bool m_showControllerConfig = false;
|
||||
|
||||
Reference in New Issue
Block a user