From b9c20fccac64e7aadd28ea6c621c4ffda2561c54 Mon Sep 17 00:00:00 2001 From: hachem Date: Fri, 22 Aug 2025 04:48:42 +0200 Subject: [add]: add bloom and blur --- src/States/SimulationState.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'src/States/SimulationState.cpp') 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(engine.GetWidth()), static_cast(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"); -- cgit v1.3