summaryrefslogtreecommitdiffstats
path: root/src/render/Sprite2d.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/render/Sprite2d.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/render/Sprite2d.cpp b/src/render/Sprite2d.cpp
index 453ed004..98bb6eb2 100644
--- a/src/render/Sprite2d.cpp
+++ b/src/render/Sprite2d.cpp
@@ -178,6 +178,7 @@ CSprite2d::SetVertices(const CRect &r, const CRGBA &c0, const CRGBA &c1, const C
z = 1.0f/RecipNearClip;
}
recipz = 1.0f/z;
+ float offset = 1.0f/1024.0f;
// This is what we draw:
// 0---1
@@ -189,8 +190,8 @@ CSprite2d::SetVertices(const CRect &r, const CRGBA &c0, const CRGBA &c1, const C
RwIm2DVertexSetCameraZ(&maVertices[0], z);
RwIm2DVertexSetRecipCameraZ(&maVertices[0], recipz);
RwIm2DVertexSetIntRGBA(&maVertices[0], c2.r, c2.g, c2.b, c2.a);
- RwIm2DVertexSetU(&maVertices[0], 0.0f, recipz);
- RwIm2DVertexSetV(&maVertices[0], 0.0f, recipz);
+ RwIm2DVertexSetU(&maVertices[0], 0.0f+offset, recipz);
+ RwIm2DVertexSetV(&maVertices[0], 0.0f+offset, recipz);
RwIm2DVertexSetScreenX(&maVertices[1], r.right);
RwIm2DVertexSetScreenY(&maVertices[1], r.top);
@@ -198,8 +199,8 @@ CSprite2d::SetVertices(const CRect &r, const CRGBA &c0, const CRGBA &c1, const C
RwIm2DVertexSetCameraZ(&maVertices[1], z);
RwIm2DVertexSetRecipCameraZ(&maVertices[1], recipz);
RwIm2DVertexSetIntRGBA(&maVertices[1], c3.r, c3.g, c3.b, c3.a);
- RwIm2DVertexSetU(&maVertices[1], 1.0f, recipz);
- RwIm2DVertexSetV(&maVertices[1], 0.0f, recipz);
+ RwIm2DVertexSetU(&maVertices[1], 1.0f+offset, recipz);
+ RwIm2DVertexSetV(&maVertices[1], 0.0f+offset, recipz);
RwIm2DVertexSetScreenX(&maVertices[2], r.right);
RwIm2DVertexSetScreenY(&maVertices[2], r.bottom);
@@ -207,8 +208,8 @@ CSprite2d::SetVertices(const CRect &r, const CRGBA &c0, const CRGBA &c1, const C
RwIm2DVertexSetCameraZ(&maVertices[2], z);
RwIm2DVertexSetRecipCameraZ(&maVertices[2], recipz);
RwIm2DVertexSetIntRGBA(&maVertices[2], c1.r, c1.g, c1.b, c1.a);
- RwIm2DVertexSetU(&maVertices[2], 1.0f, recipz);
- RwIm2DVertexSetV(&maVertices[2], 1.0f, recipz);
+ RwIm2DVertexSetU(&maVertices[2], 1.0f+offset, recipz);
+ RwIm2DVertexSetV(&maVertices[2], 1.0f+offset, recipz);
RwIm2DVertexSetScreenX(&maVertices[3], r.left);
RwIm2DVertexSetScreenY(&maVertices[3], r.bottom);
@@ -216,8 +217,8 @@ CSprite2d::SetVertices(const CRect &r, const CRGBA &c0, const CRGBA &c1, const C
RwIm2DVertexSetCameraZ(&maVertices[3], z);
RwIm2DVertexSetRecipCameraZ(&maVertices[3], recipz);
RwIm2DVertexSetIntRGBA(&maVertices[3], c0.r, c0.g, c0.b, c0.a);
- RwIm2DVertexSetU(&maVertices[3], 0.0f, recipz);
- RwIm2DVertexSetV(&maVertices[3], 1.0f, recipz);
+ RwIm2DVertexSetU(&maVertices[3], 0.0f+offset, recipz);
+ RwIm2DVertexSetV(&maVertices[3], 1.0f+offset, recipz);
}
void