Ver Fonte

small pixel offset on tileGroup

Nicolas Cannasse há 11 anos atrás
pai
commit
216d2c9661
1 ficheiros alterados com 3 adições e 2 exclusões
  1. 3 2
      h2d/TileGroup.hx

+ 3 - 2
h2d/TileGroup.hx

@@ -35,8 +35,9 @@ private class TileLayerContent extends h3d.prim.Primitive {
 	}
 
 	public function add( x : Int, y : Int, r : Float, g : Float, b : Float, a : Float, t : Tile ) {
-		var sx = x + t.dx;
-		var sy = y + t.dy;
+		// +0.001 required for directx9 (only ?)
+		var sx = x + t.dx + 0.001;
+		var sy = y + t.dy + 0.001;
 		tmp.push(sx);
 		tmp.push(sy);
 		tmp.push(t.u);