diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2022-11-29 22:15:27 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-11-29 22:32:46 +0100 |
commit | 9c5027215e1052adb0131362207b78ec89822985 (patch) | |
tree | ad928799caedab4fa497802e8981db9dc66fcc76 /editor | |
parent | 2659fae8c838601282b9b90d5e0dc8b1da3f3f2b (diff) |
fix z value discontinuity on chunk boundaries
Diffstat (limited to 'editor')
-rw-r--r-- | editor/camera.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/camera.cpp b/editor/camera.cpp index e22b20ba..d7fc8695 100644 --- a/editor/camera.cpp +++ b/editor/camera.cpp @@ -41,7 +41,7 @@ void app::do_camera(float dt, const key_set& cmds, int mods) camera_offset[0] = std::clamp(camera_offset[0], -max_camera_offset[0], max_camera_offset[0]); camera_offset[1] = std::clamp(camera_offset[1], -max_camera_offset[1], max_camera_offset[1]); - shader.set_camera_offset(camera_offset); + shader.set_camera_offset(camera_offset, shader.depth_offset()); update_cursor_tile(cursor.pixel); do_mouse_move(mods); @@ -52,7 +52,7 @@ void app::reset_camera_offset() { constexpr Vector3d size = TILE_MAX_DIM20d*dTILE_SIZE*-.5; constexpr auto projected = tile_shader::project(size); - M->shader().set_camera_offset(projected); + M->shader().set_camera_offset(projected, 0); update_cursor_tile(cursor.pixel); } |