summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2024-01-11 20:02:09 +0100
committerStanislaw Halik <sthalik@misaki.pl>2024-01-11 20:02:09 +0100
commit6fe22e25a0563c34ced759d09978ac1e99364bfc (patch)
tree4cfe2a0acf544b026f3d54fcf592619cbb32645c /src
parent618af3c94ca418511a658c7a3e074b249b6e6937 (diff)
a
Diffstat (limited to 'src')
-rw-r--r--src/chunk-walls.cpp3
1 files changed, 2 insertions, 1 deletions
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];