diff options
| author | Stanislaw Halik <sthalik@misaki.pl> | 2023-04-08 17:41:21 +0200 |
|---|---|---|
| committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-04-08 17:41:21 +0200 |
| commit | 714116b75a1e8812f8faa4f44bc0e028e62250a5 (patch) | |
| tree | 95609d90bb99e1d64c415492057de24c2ca0dc69 /src/camera-offset.cpp | |
| parent | ae574bae0796171b3148d8cbc4ccd869a6f1e63a (diff) | |
just force drawing the roof tiles
Diffstat (limited to 'src/camera-offset.cpp')
| -rw-r--r-- | src/camera-offset.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/camera-offset.cpp b/src/camera-offset.cpp index 959fe4d5..fb4724cc 100644 --- a/src/camera-offset.cpp +++ b/src/camera-offset.cpp @@ -17,7 +17,10 @@ with_shifted_camera_offset::with_shifted_camera_offset(tile_shader& shader, chun //cx += c.z; cy += c.z; float depth_offset = shader.depth_tile_size*(cy*TILE_MAX_DIM*len_x*TILE_MAX_DIM + cx*TILE_MAX_DIM); const int z = c.z - chunk_min_z; - depth_offset += tile_shader::depth_value(local_coords{z, z}, tile_shader::scenery_depth_offset*(z+1)); + depth_offset += tile_shader::depth_value(local_coords{z, z}); + + if (c.z == chunk_max_z) + depth_offset = 1; _shader.set_camera_offset(offset, depth_offset); } |
