diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2022-10-15 12:33:23 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-10-15 12:33:23 +0200 |
commit | 2309c239a613ba5a2f6a9fb3f2d86f9c4072856c (patch) | |
tree | edefe5045484e7efe6dee3e7c36cecfd494047d7 | |
parent | 4e77740facb23e1c392f180381ccb5446d445724 (diff) |
a
-rw-r--r-- | src/tile-atlas.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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<Vector2, 4> 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 |