diff options
| author | Stanislaw Halik <sthalik@misaki.pl> | 2023-04-14 11:58:23 +0200 |
|---|---|---|
| committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-04-14 11:58:23 +0200 |
| commit | f5c387da470ae43a2c8aff75b419e784c8bb3bc5 (patch) | |
| tree | 744a80e82462849ae538b6c04e941ab6fd7d09fa /src/camera-offset.cpp | |
| parent | e1ae8881918415ef13fdea7c7087d01d873ad07a (diff) | |
it probably renders correctly now
Diffstat (limited to 'src/camera-offset.cpp')
| -rw-r--r-- | src/camera-offset.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/camera-offset.cpp b/src/camera-offset.cpp index 95933316..d662803a 100644 --- a/src/camera-offset.cpp +++ b/src/camera-offset.cpp @@ -19,11 +19,11 @@ with_shifted_camera_offset::with_shifted_camera_offset(tile_shader& shader, chun int depth = TILE_MAX_DIM*2 * pos.sum(); #if 0 - if (c_ == chunk_coords_{} || c_ == chunk_coords_{0, -1, 1}) - printf("c=(%2hd %2hd %2hhd) pos=(%2d %2d) len=(%d %d) --> %d\n", c_.x, c_.y, c_.z, pos.x(), pos.y(), len.x(), len.y(), depth); + printf("c=(%2hd %2hd %2hhd) pos=(%2d %2d) len=(%d %d) --> %d\n", c_.x, c_.y, c_.z, pos.x(), pos.y(), len.x(), len.y(), depth); #endif - float d = depth * tile_shader::depth_tile_size + depth_start; + auto z_offset = (z-chunk_z_min) * tile_shader::depth_value({}, tile_shader::z_depth_offset); + auto d = depth * tile_shader::depth_tile_size + depth_start + z_offset; if (c_.z == chunk_z_max) d = 1; |
