From 2309c239a613ba5a2f6a9fb3f2d86f9c4072856c Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sat, 15 Oct 2022 12:33:23 +0200 Subject: a --- src/tile-atlas.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tile-atlas.cpp b/src/tile-atlas.cpp index 0f6ef7bc..65e81053 100644 --- a/src/tile-atlas.cpp +++ b/src/tile-atlas.cpp @@ -28,7 +28,7 @@ std::array tile_atlas::texcoords_for_id(std::size_t id_) const ASSERT(id_ < sz.product()); const Vector2ui id = { (UnsignedInt)id_ % dims_[0], (UnsignedInt)id_ / dims_[0] }; const Vector2 p0(id * sz), p1(sz); - const auto x0 = p0.x(), x1 = p1.x(), y0 = p0.y(), y1 = p1.y(); + const auto x0 = p0.x(), x1 = p1.x()-1, y0 = p0.y(), y1 = p1.y()-1; return {{ { x0+x1, y0+y1 }, // bottom right { x0+x1, y0 }, // top right -- cgit v1.2.3