From 6fe22e25a0563c34ced759d09978ac1e99364bfc Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Thu, 11 Jan 2024 20:02:09 +0100 Subject: a --- src/chunk-walls.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/chunk-walls.cpp b/src/chunk-walls.cpp index a9b432d6..74a975fb 100644 --- a/src/chunk-walls.cpp +++ b/src/chunk-walls.cpp @@ -242,7 +242,8 @@ GL::Mesh chunk::make_wall_mesh() const auto frames = atlas->frames(dir.corner); auto variant = (variant_ != (uint8_t)-1 ? variant_ : vpos); const auto depth_offset = depth_offset_for_group(Group_::corner, is_west); - const auto depth = tile_shader::depth_value(!is_west ? (float)pos.x : (float)pos.x - 1, depth_offset); + const auto pos_x = !is_west ? (float)pos.x : (float)pos.x - 1; + const auto depth = tile_shader::depth_value(pos_x, pos.y, depth_offset); variant += !is_west ? frames.size() - 1 : 1; variant = variant % frames.size(); const auto& frame = frames[variant]; -- cgit v1.2.3