diff options
-rw-r--r-- | serialize/world-reader.cpp | 2 | ||||
-rw-r--r-- | src/chunk-walls.cpp | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/serialize/world-reader.cpp b/serialize/world-reader.cpp index 5e66616b..74023092 100644 --- a/serialize/world-reader.cpp +++ b/serialize/world-reader.cpp @@ -217,7 +217,7 @@ void reader_state::read_chunks(reader_t& s) auto name = lookup_atlas(id); if constexpr(std::is_same_v<ground_atlas, T>) { - auto atlas = loader.ground_atlas(name); + auto atlas = loader.ground_atlas(name, true); fm_soft_assert(v < atlas->num_tiles()); return { atlas, v }; } 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]; |