diff options
| author | Stanislaw Halik <sthalik@misaki.pl> | 2023-02-25 21:47:56 +0100 |
|---|---|---|
| committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-02-25 21:56:16 +0100 |
| commit | c9431f34e543dc0e6bf564e4ada9574072e92918 (patch) | |
| tree | 926ed08d8e15a93e946b2adfab725383092e86e5 /src/camera-offset.cpp | |
| parent | 6a4ac0dc015106801d79cc258b06f896ea0e2716 (diff) | |
convert to magnum vectors and use shorter syntax
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 1c77659c..15401bb0 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(c.x, c.y, 0) * chunk_size); + const auto offset = _camera + tile_shader::project(Vector3d(Vector2d(c), 0) * 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); |
