From 1ef440478f7861d7d399fa570df950b02626c46e Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Fri, 25 Aug 2023 18:46:37 +0200 Subject: shaders/lightmap: clean up a bit Note, `chunk_offset` isn't needed because origin is actually expected at the center of the first tile. --- editor/imgui.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'editor') diff --git a/editor/imgui.cpp b/editor/imgui.cpp index 7206a318..57c10100 100644 --- a/editor/imgui.cpp +++ b/editor/imgui.cpp @@ -217,11 +217,10 @@ void app::do_lightmap_test() auto& shader = M->lightmap_shader(); auto ch = e.coord.chunk(); auto z = e.coord.z(); - constexpr auto ns = lightmap_shader::neighbor_count; + const auto ns = shader.iter_bounds(); shader.begin_occlusion(); -#if 1 for (int j = ch.y - ns; j < ch.y + ns; j++) for (int i = ch.x - ns; i < ch.x + ns; i++) { @@ -232,7 +231,6 @@ void app::do_lightmap_test() shader.add_chunk(offset, *chunk); } } -#endif shader.end_occlusion(); shader.bind(); -- cgit v1.2.3