diff options
| author | hachem <im@hachem.wtf> | 2025-08-22 04:48:42 +0200 |
|---|---|---|
| committer | hachem <im@hachem.wtf> | 2025-08-22 04:48:42 +0200 |
| commit | 77717ae7c4f7c8f180e5c5e24cf1098c02f3dbf4 (patch) | |
| tree | 61ef3218a5e1f46e13b10cea3141f2eeee81bd7c /src/states | |
| parent | 2dd07499241638e66ee0df97cba91219f5599151 (diff) | |
feat: add bloom and blur
Diffstat (limited to 'src/states')
| -rw-r--r-- | src/states/simulation_state.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/states/simulation_state.cpp b/src/states/simulation_state.cpp index 5c75569..6d7ae47 100644 --- a/src/states/simulation_state.cpp +++ b/src/states/simulation_state.cpp @@ -60,7 +60,7 @@ namespace Donut RenderCommand::set_viewport(0, 0, static_cast<uint32_t>(engine.get_width()), static_cast<uint32_t>(engine.get_height())); engine.dispatch_compute(engine.get_camera()); - engine.draw_full_screen_quad(); + engine.draw_blur_pass(); } void SimulationState::on_event(Event& event) @@ -244,6 +244,20 @@ namespace Donut } ImGui::TextDisabled("Rotation speed multiplier (0 = no rotation)"); + float blur_strength = engine.get_blur_strength(); + if (ImGui::SliderFloat("Blur Strength", &blur_strength, 0.5f, 5.0f, "%.2f")) + { + engine.set_blur_strength(blur_strength); + } + ImGui::TextDisabled("Blur radius for glow effect"); + + float glow_intensity = engine.get_glow_intensity(); + if (ImGui::SliderFloat("Glow Intensity", &glow_intensity, 0.1f, 3.0f, "%.2f")) + { + engine.set_glow_intensity(glow_intensity); + } + ImGui::TextDisabled("Intensity of the glow effect"); + ImGui::Spacing(); ImGui::TextColored(ImVec4(0.9f, 0.9f, 1.0f, 1.0f), "Camera"); |
