summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/tile-atlas.cpp2
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