aboutsummaryrefslogtreecommitdiff
path: root/src/States/SimulationState.cpp
diff options
context:
space:
mode:
authorhachem <im@hachem.wtf>2025-08-22 04:48:42 +0200
committerhachem <im@hachem.wtf>2025-08-22 04:48:42 +0200
commitb9c20fccac64e7aadd28ea6c621c4ffda2561c54 (patch)
treec0efeabd28e53d136f253fa5a7bab19c0fb765f6 /src/States/SimulationState.cpp
parentf469a1d1e8413e07f3e3033e719161ffd17fe463 (diff)
[add]: add bloom and blur
Diffstat (limited to 'src/States/SimulationState.cpp')
-rw-r--r--src/States/SimulationState.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/States/SimulationState.cpp b/src/States/SimulationState.cpp
index 28504e6..2a79b3c 100644
--- a/src/States/SimulationState.cpp
+++ b/src/States/SimulationState.cpp
@@ -60,7 +60,7 @@ namespace Donut
RenderCommand::SetViewport(0, 0, static_cast<uint32_t>(engine.GetWidth()), static_cast<uint32_t>(engine.GetHeight()));
engine.DispatchCompute(engine.GetCamera());
- engine.DrawFullScreenQuad();
+ engine.DrawBlurPass();
}
void SimulationState::OnEvent(Event& event)
@@ -244,6 +244,20 @@ namespace Donut
}
ImGui::TextDisabled("Rotation speed multiplier (0 = no rotation)");
+ float blurStrength = engine.GetBlurStrength();
+ if (ImGui::SliderFloat("Blur Strength", &blurStrength, 0.5f, 5.0f, "%.2f"))
+ {
+ engine.SetBlurStrength(blurStrength);
+ }
+ ImGui::TextDisabled("Blur radius for glow effect");
+
+ float glowIntensity = engine.GetGlowIntensity();
+ if (ImGui::SliderFloat("Glow Intensity", &glowIntensity, 0.1f, 3.0f, "%.2f"))
+ {
+ engine.SetGlowIntensity(glowIntensity);
+ }
+ ImGui::TextDisabled("Intensity of the glow effect");
+
ImGui::Spacing();
ImGui::TextColored(ImVec4(0.9f, 0.9f, 1.0f, 1.0f), "Camera");