diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/camera-offset.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/camera-offset.cpp b/src/camera-offset.cpp index ad5c8818..95933316 100644 --- a/src/camera-offset.cpp +++ b/src/camera-offset.cpp @@ -8,15 +8,15 @@ with_shifted_camera_offset::with_shifted_camera_offset(tile_shader& shader, chun _shader{shader}, _camera{shader.camera_offset()} { + (void)last_; fm_assert(shader.depth_offset() == 0.f); auto z = int{c_.z}; auto offset = _camera + tile_shader::project((Vector3d(c_.x, c_.y, 0) * TILE_MAX_DIM20d + Vector3d(0, 0, z)) * dTILE_SIZE); auto pos = chunk_coords(c_) - first_; - auto len = (last_ - first_) + Vector2i(1, 1); constexpr auto depth_start = -1 + 1.111e-16f; - int depth = TILE_MAX_DIM * pos.x() + (int)TILE_COUNT * len.x() * pos.y(); + int depth = TILE_MAX_DIM*2 * pos.sum(); #if 0 if (c_ == chunk_coords_{} || c_ == chunk_coords_{0, -1, 1}) |