From c6ccedb97020e42b96dc55e463d7a80b156a2dff Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Tue, 8 Feb 2022 08:32:58 -0500 Subject: [PATCH] Add environment probe controls to debug menu --- engine/core/src/debug.cpp | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/engine/core/src/debug.cpp b/engine/core/src/debug.cpp index 6b50a61..d317c77 100644 --- a/engine/core/src/debug.cpp +++ b/engine/core/src/debug.cpp @@ -76,8 +76,22 @@ void draw_lighting() { ImGui::Text("Environment"); ImGui::Separator(); - - if(ImGui::Button("Reload shadows")) { + + for(auto& [obj, probe] : engine->get_scene()->get_all()) { + ImGui::PushID(obj); + + ImGui::TextDisabled("%s", engine->get_scene()->get(obj).name.c_str()); + + auto& transform = engine->get_scene()->get(obj); + ImGui::DragFloat3("Position", transform.position.ptr()); + ImGui::DragFloat3("Probe Size", probe.size.ptr(), 0.1f); + + ImGui::PopID(); + + ImGui::Separator(); + } + + if(ImGui::Button("Reload shadows")) { engine->get_scene()->reset_shadows(); }