diff --git a/src/dusk/imgui/ImGuiConsole.hpp b/src/dusk/imgui/ImGuiConsole.hpp index 96fd1dd7fc..bfc7c4043d 100644 --- a/src/dusk/imgui/ImGuiConsole.hpp +++ b/src/dusk/imgui/ImGuiConsole.hpp @@ -13,6 +13,7 @@ namespace dusk { public: ImGuiConsole(); void draw(); + bool isBloomEnabled() { return m_menuGame.isBloomEnabled(); } static bool CheckMenuViewToggle(ImGuiKey key, bool& active); diff --git a/src/dusk/imgui/ImGuiMenuGame.cpp b/src/dusk/imgui/ImGuiMenuGame.cpp index c0b750c982..3d9af4fdc5 100644 --- a/src/dusk/imgui/ImGuiMenuGame.cpp +++ b/src/dusk/imgui/ImGuiMenuGame.cpp @@ -22,6 +22,7 @@ namespace dusk { ImGui::Separator(); if (ImGui::BeginMenu("Graphics")) { + ImGui::Checkbox("Native Bloom", &m_graphicsSettings.m_enableBloom); ImGui::EndMenu(); } @@ -426,4 +427,4 @@ namespace dusk { ImGui::End(); } -} \ No newline at end of file +} diff --git a/src/dusk/imgui/ImGuiMenuGame.hpp b/src/dusk/imgui/ImGuiMenuGame.hpp index 7945250608..a76a20f7c4 100644 --- a/src/dusk/imgui/ImGuiMenuGame.hpp +++ b/src/dusk/imgui/ImGuiMenuGame.hpp @@ -12,6 +12,7 @@ namespace dusk { public: ImGuiMenuGame(); void draw(); + bool isBloomEnabled() { return m_graphicsSettings.m_enableBloom; } void windowInputViewer(); void windowControllerConfig(); @@ -32,6 +33,10 @@ namespace dusk { int m_pendingPort = -1; } m_controllerConfig; + struct { + bool m_enableBloom = 1; + } m_graphicsSettings; + bool m_showControllerConfig = false; bool m_showInputViewer = false; diff --git a/src/m_Do/m_Do_graphic.cpp b/src/m_Do/m_Do_graphic.cpp index 4d1327a8be..2a8c9847d4 100644 --- a/src/m_Do/m_Do_graphic.cpp +++ b/src/m_Do/m_Do_graphic.cpp @@ -1135,6 +1135,11 @@ void mDoGph_gInf_c::bloom_c::remove() { } void mDoGph_gInf_c::bloom_c::draw() { +#if TARGET_PC + if (!dusk::g_imguiConsole.isBloomEnabled()) { + return; + } +#endif bool enabled = mEnable && m_buffer != NULL; if (mMonoColor.a != 0 || enabled) { #if TARGET_PC