diff options
| author | Stanislaw Halik <sthalik@misaki.pl> | 2023-02-27 17:58:04 +0100 |
|---|---|---|
| committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-02-27 17:58:04 +0100 |
| commit | 883545889d94fea794ff2ba989d4e93be50b9a78 (patch) | |
| tree | dceeadbe482b9f14e861a3271fc9970600de0fed /src/camera-offset.cpp | |
| parent | 670057cbec1ba8f01edf4c8ced4fded33a8f90eb (diff) | |
src: add Vector3 conversion to {local,chunk}_coords
Diffstat (limited to 'src/camera-offset.cpp')
| -rw-r--r-- | src/camera-offset.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/camera-offset.cpp b/src/camera-offset.cpp index 15401bb0..060e1559 100644 --- a/src/camera-offset.cpp +++ b/src/camera-offset.cpp @@ -13,7 +13,7 @@ with_shifted_camera_offset::with_shifted_camera_offset(tile_shader& shader, chun fm_assert(shader.depth_offset() == 0.f); constexpr auto chunk_size = TILE_MAX_DIM20d*dTILE_SIZE; - const auto offset = _camera + tile_shader::project(Vector3d(Vector2d(c), 0) * chunk_size); + const auto offset = _camera + tile_shader::project(Vector3d(c) * chunk_size); const auto len_x = (float)(last.x - first.x), cx = (float)(c.x - first.x), cy = (float)(c.y - first.y); const float depth_offset = shader.depth_tile_size*(cy*TILE_MAX_DIM*len_x*TILE_MAX_DIM + cx*TILE_MAX_DIM); |
