Nicolas Cannasse 13 năm trước cách đây
mục cha
commit
005f93fff8
1 tập tin đã thay đổi với 3 bổ sung2 xóa
  1. 3 2
      h2d/Tools.hx

+ 3 - 2
h2d/Tools.hx

@@ -45,8 +45,9 @@ class Tools {
 		}
 		}
 		setBlendMode(b.material, blendMode);
 		setBlendMode(b.material, blendMode);
 		var tmp = TMP_VECTOR;
 		var tmp = TMP_VECTOR;
-		tmp.x = tile.width;
-		tmp.y = tile.height;
+		// adds 1/10 pixel size to prevent precision loss after scaling
+		tmp.x = tile.width + 0.1;
+		tmp.y = tile.height + 0.1;
 		tmp.z = 1;
 		tmp.z = 1;
 		b.shader.size = tmp;
 		b.shader.size = tmp;
 		tmp.x = spr.matA;
 		tmp.x = spr.matA;