diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2023-08-25 18:46:37 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-08-25 18:48:25 +0200 |
commit | 1ef440478f7861d7d399fa570df950b02626c46e (patch) | |
tree | 55d6b8c071734772c0d2ddfac03ae9299b9cbc40 /editor | |
parent | 9eb409b87e2f6750bbff18281222e829f9a44e18 (diff) |
shaders/lightmap: clean up a bit
Note, `chunk_offset` isn't needed because origin is actually expected at
the center of the first tile.
Diffstat (limited to 'editor')
-rw-r--r-- | editor/imgui.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
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(); |