From 060ea55805ff629e0971ef8a37592228faf2a17f Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Mon, 12 Jun 2023 04:02:29 +0200 Subject: lightmap sort of works now --- editor/imgui.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'editor') diff --git a/editor/imgui.cpp b/editor/imgui.cpp index 82fe42b1..c22c6ebf 100644 --- a/editor/imgui.cpp +++ b/editor/imgui.cpp @@ -228,8 +228,9 @@ void app::draw_lightmap_test() }; auto& shader = M->lightmap_shader(); shader.begin({0, 0}, L); + shader.add_chunk({}, e_->chunk()); shader.end(); - M->bind(); // todo + M->bind(); ImGui::Image(&shader.texture(), {1024, 1024}); } ImGui::End(); @@ -305,7 +306,9 @@ void app::kill_popups(bool hard) _pending_popup = false; _popup_target = {}; - _tested_light = 0; + + if (hard) + _tested_light = 0; if (imgui) ImGui::CloseCurrentPopup(); -- cgit v1.2.3