Add environment probe controls to debug menu
This commit is contained in:
parent
a773efdc35
commit
c6ccedb970
1 changed files with 16 additions and 2 deletions
|
@ -77,6 +77,20 @@ void draw_lighting() {
|
||||||
ImGui::Text("Environment");
|
ImGui::Text("Environment");
|
||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
|
|
||||||
|
for(auto& [obj, probe] : engine->get_scene()->get_all<EnvironmentProbe>()) {
|
||||||
|
ImGui::PushID(obj);
|
||||||
|
|
||||||
|
ImGui::TextDisabled("%s", engine->get_scene()->get(obj).name.c_str());
|
||||||
|
|
||||||
|
auto& transform = engine->get_scene()->get<Transform>(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")) {
|
if(ImGui::Button("Reload shadows")) {
|
||||||
engine->get_scene()->reset_shadows();
|
engine->get_scene()->reset_shadows();
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue