@@ -417,9 +417,8 @@ class Drawable extends Sprite {
if( options & HAS_SIZE != 0 ) {
var tmp = core.tmpSize;
- // adds 1/10 pixel size to prevent precision loss after scaling
- tmp.x = tile.width + 0.1;
- tmp.y = tile.height + 0.1;
+ tmp.x = tile.width;
+ tmp.y = tile.height;
tmp.z = 1;
shader.size = tmp;
}
@@ -358,6 +358,11 @@ class Scene extends Layers implements h3d.IDrawable {
var h = -2 / height;
absX = absX * w - 1;
absY = absY * h + 1;
+
+ // half pixel align
+ absX += 1 / width;
+ absY -= 1 / height;
matA *= w;
matB *= h;
matC *= w;
@@ -3,7 +3,7 @@ package h2d;
@:allow(h2d)
class Tile {
- static inline var EPSILON_PIXEL = 0.001;
+ static inline var EPSILON_PIXEL = 0;
var innerTex : h3d.mat.Texture;