From f5c387da470ae43a2c8aff75b419e784c8bb3bc5 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Fri, 14 Apr 2023 11:58:23 +0200 Subject: it probably renders correctly now --- src/chunk-scenery.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/chunk-scenery.cpp') diff --git a/src/chunk-scenery.cpp b/src/chunk-scenery.cpp index ad29a3d7..c8dad93e 100644 --- a/src/chunk-scenery.cpp +++ b/src/chunk-scenery.cpp @@ -158,8 +158,7 @@ auto chunk::ensure_scenery_mesh(scenery_scratch_buffers buffers) noexcept -> sce const auto quad = atlas->frame_quad(coord, fr.r, fr.frame); const auto& group = atlas->group(fr.r); const auto texcoords = atlas->texcoords_for_frame(fr.r, fr.frame, !group.mirror_from.isEmpty()); - const auto depth2 = e->depth_offset(); - const auto d = depth2.y() * TILE_MAX_DIM + depth2.x(); + const auto d = e->depth_offset(); const float depth = tile_shader::depth_value(pos, d); for (auto j = 0uz; j < 4; j++) -- cgit v1.2.3