Toggle bloom from graphics menu

This commit is contained in:
Irastris
2026-03-16 19:54:44 -04:00
parent 61d2ba1e33
commit 563e25e1b9
4 changed files with 13 additions and 1 deletions
+1
View File
@@ -13,6 +13,7 @@ namespace dusk {
public:
ImGuiConsole();
void draw();
bool isBloomEnabled() { return m_menuGame.isBloomEnabled(); }
static bool CheckMenuViewToggle(ImGuiKey key, bool& active);
+2 -1
View File
@@ -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();
}
}
}
+5
View File
@@ -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;
+5
View File
@@ -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