summaryrefslogtreecommitdiffhomepage
path: root/src/camera-offset.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/camera-offset.cpp')
-rw-r--r--src/camera-offset.cpp1
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);