diff options
| author | Stanislaw Halik <sthalik@misaki.pl> | 2023-04-08 15:59:19 +0200 |
|---|---|---|
| committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-04-08 15:59:19 +0200 |
| commit | 3570e2f5aefdd0b5d262fe99ccd8b4a54aa79b83 (patch) | |
| tree | dd6f1b9f1cc4fbd4ac74de7b6e0cd90900c75330 /src/chunk-render.cpp | |
| parent | c908c0cc43211d9937340b2a0704e8c53241b035 (diff) | |
fix wall z>0 clipping over z=0 scenery
Diffstat (limited to 'src/chunk-render.cpp')
| -rw-r--r-- | src/chunk-render.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/chunk-render.cpp b/src/chunk-render.cpp index 9e216e8d..8ec10610 100644 --- a/src/chunk-render.cpp +++ b/src/chunk-render.cpp @@ -71,7 +71,7 @@ GL::Mesh chunk::make_wall_mesh(size_t count) const local_coords pos{i / 2u}; const auto center = Vector3(pos) * TILE_SIZE; const auto quad = i & 1 ? atlas->wall_quad_W(center, TILE_SIZE) : atlas->wall_quad_N(center, TILE_SIZE); - const float depth = tile_shader::depth_value(pos); + const float depth = tile_shader::depth_value(pos, tile_shader::wall_depth_offset); const auto texcoords = atlas->texcoords_for_id(variant); auto& v = vertexes[k]; for (auto j = 0uz; j < 4; j++) |
