From 3570e2f5aefdd0b5d262fe99ccd8b4a54aa79b83 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sat, 8 Apr 2023 15:59:19 +0200 Subject: fix wall z>0 clipping over z=0 scenery --- src/chunk-render.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/chunk-render.cpp') 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++) -- cgit v1.2.3