diff options
| author | Stanislaw Halik <sthalik@misaki.pl> | 2023-04-06 10:08:04 +0200 |
|---|---|---|
| committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-04-06 10:08:04 +0200 |
| commit | 9703532543d528757e4635f0eb5c91ccb4c2e300 (patch) | |
| tree | bf30bb6980d382a202df38365ff00a0d6a0e8eb2 /src/camera-offset.cpp | |
| parent | 6799cc5c195562ca36b73e8aec259cc9caf49e2c (diff) | |
a
Diffstat (limited to 'src/camera-offset.cpp')
| -rw-r--r-- | src/camera-offset.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/camera-offset.cpp b/src/camera-offset.cpp index 84dc6141..bf700138 100644 --- a/src/camera-offset.cpp +++ b/src/camera-offset.cpp @@ -12,6 +12,7 @@ with_shifted_camera_offset::with_shifted_camera_offset(tile_shader& shader, chun constexpr auto chunk_size = TILE_MAX_DIM20d*dTILE_SIZE; const auto offset = _camera + tile_shader::project(Vector3d(c) * chunk_size); + first.x -= 8; first.y -= 8; last.x += 8; last.y += 8; // Z levels 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); |
