summaryrefslogtreecommitdiffhomepage
path: root/editor
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2023-06-17 07:29:02 +0200
committerStanislaw Halik <sthalik@misaki.pl>2023-06-17 07:29:02 +0200
commit0c9383d5944a53b9b6fcc60fc56450a5418f0963 (patch)
treeb5b83af37c1ea08b71c5eb644c76dcdb75bc76c7 /editor
parent1c8f175159520518f05da9b287c783b692bd453f (diff)
shaders: wip
Diffstat (limited to 'editor')
-rw-r--r--editor/imgui.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/editor/imgui.cpp b/editor/imgui.cpp
index c22c6ebf..d8377033 100644
--- a/editor/imgui.cpp
+++ b/editor/imgui.cpp
@@ -227,11 +227,13 @@ void app::draw_lightmap_test()
.falloff = li.falloff,
};
auto& shader = M->lightmap_shader();
- shader.begin({0, 0}, L);
+ shader.begin_accum();
+ shader.begin_light({ 0, 0 }, L);
shader.add_chunk({}, e_->chunk());
- shader.end();
+ shader.finish_light_only();
+ ImGui::Image(&shader.scratch_texture(), {1024, 1024});
+ shader.end_accum();
M->bind();
- ImGui::Image(&shader.texture(), {1024, 1024});
}
ImGui::End();
if (!is_open)