diff options
-rw-r--r-- | editor/imgui.cpp | 5 | ||||
-rw-r--r-- | shaders/shader.hpp | 2 |
2 files changed, 3 insertions, 4 deletions
diff --git a/editor/imgui.cpp b/editor/imgui.cpp index 560e8f5b..399a2e69 100644 --- a/editor/imgui.cpp +++ b/editor/imgui.cpp @@ -235,9 +235,8 @@ void app::draw_lightmap_test() //shader.finish_and_blend_light(); shader.finish_light_only(); shader.end_accum(); - constexpr auto img_size = 1 / Vector2(lightmap_shader::max_chunks); - constexpr auto uv1 = ImVec2{img_size.x(), img_size.y()}; - ImGui::Image(&shader.scratch_texture(), preview_size, ImVec2{0, 0}, uv1); + //constexpr auto img_size = 1 / Vector2(lightmap_shader::max_chunks); + ImGui::Image(&shader.scratch_texture(), preview_size, {0, 0}, {1, 1}); M->bind(); } ImGui::End(); diff --git a/shaders/shader.hpp b/shaders/shader.hpp index 68e85d35..e53fb6d3 100644 --- a/shaders/shader.hpp +++ b/shaders/shader.hpp @@ -42,7 +42,7 @@ struct tile_shader final : private GL::AbstractShaderProgram static constexpr float ground_depth_offset = 0; // todo scenery cut off at chunk boundary static constexpr float wall_depth_offset = 1; static constexpr float z_depth_offset = 1 + 2./64; - static constexpr float depth_tile_size = 1/(double)(TILE_MAX_DIM * 2 * max_screen_tiles.product()); + static constexpr float depth_tile_size = 1.f/(TILE_MAX_DIM * 2 * max_screen_tiles.product()); static constexpr float foreshortening_factor = 0.578125f; private: |