瀏覽代碼

fix blendMode

ncannasse 8 年之前
父節點
當前提交
4030364933
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      h2d/Particles.hx

+ 3 - 0
h2d/Particles.hx

@@ -397,12 +397,15 @@ class Particles extends Drawable {
 	}
 
 	override function draw(ctx:RenderContext) {
+		var old = blendMode;
 		for( g in groups )
 			if( g.enable ) {
 				pshader.gradient = g.colorGradient;
 				pshader.hasGradient = g.colorGradient != null;
+				blendMode = g.batch.blendMode;
 				g.batch.drawWith(ctx, this);
 			}
+		blendMode = old;
 	}
 
 	public inline function getGroups() {