diff options
Diffstat (limited to 'src/chunk-walls.cpp')
-rw-r--r-- | src/chunk-walls.cpp | 3 |
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]; |