ncannasse 8 年之前
父节点
当前提交
49deb6763a
共有 2 个文件被更改,包括 5 次插入5 次删除
  1. 1 1
      h2d/filter/AbstractMask.hx
  2. 4 4
      h2d/filter/Glow.hx

+ 1 - 1
h2d/filter/AbstractMask.hx

@@ -90,7 +90,7 @@ class AbstractMask extends Filter {
 		maskMatrix.y /= tile.height;
 		maskMatrix.y /= tile.height;
 
 
 		maskMatrix.scale(tile.width / t.width, tile.height / t.height);
 		maskMatrix.scale(tile.width / t.width, tile.height / t.height);
-		t.filter = filter ? Linear : Nearest;
+		t.filter = smooth ? Linear : Nearest;
 
 
 		return t;
 		return t;
 	}
 	}

+ 4 - 4
h2d/filter/Glow.hx

@@ -5,20 +5,20 @@ class Glow extends Blur {
 	public var color : Int;
 	public var color : Int;
 	public var alpha : Float;
 	public var alpha : Float;
 	public var knockout : Bool;
 	public var knockout : Bool;
-	public var smooth : Bool;
+	public var smoothColor : Bool;
 
 
-	public function new( color : Int = 0xFFFFFF, alpha = 1., quality = 1, passes = 1, sigma = 1., smooth = false ) {
+	public function new( color : Int = 0xFFFFFF, alpha = 1., quality = 1, passes = 1, sigma = 1., smoothColor = false ) {
 		super(quality, passes, sigma);
 		super(quality, passes, sigma);
 		this.color = color;
 		this.color = color;
 		this.alpha = alpha;
 		this.alpha = alpha;
-		this.smooth = smooth;
+		this.smoothColor = smoothColor;
 		pass.shader.hasFixedColor = true;
 		pass.shader.hasFixedColor = true;
 	}
 	}
 
 
 	override function draw( ctx : RenderContext, t : h2d.Tile ) {
 	override function draw( ctx : RenderContext, t : h2d.Tile ) {
 		pass.shader.fixedColor.setColor(color);
 		pass.shader.fixedColor.setColor(color);
 		pass.shader.fixedColor.w = alpha;
 		pass.shader.fixedColor.w = alpha;
-		pass.shader.smoothFixedColor = smooth;
+		pass.shader.smoothFixedColor = smoothColor;
 		var save = ctx.textures.allocTarget("glowSave", ctx, t.width, t.height, false);
 		var save = ctx.textures.allocTarget("glowSave", ctx, t.width, t.height, false);
 		h3d.pass.Copy.run(t.getTexture(), save, None);
 		h3d.pass.Copy.run(t.getTexture(), save, None);
 		pass.apply(t.getTexture(), ctx.textures.allocTarget("glowTmp", ctx, t.width, t.height, false));
 		pass.apply(t.getTexture(), ctx.textures.allocTarget("glowTmp", ctx, t.width, t.height, false));