|
@@ -15,10 +15,14 @@ class Glow extends Blur {
|
|
pass.shader.hasFixedColor = true;
|
|
pass.shader.hasFixedColor = true;
|
|
}
|
|
}
|
|
|
|
|
|
- override function draw( ctx : RenderContext, t : h2d.Tile ) {
|
|
|
|
|
|
+ function setParams() {
|
|
pass.shader.fixedColor.setColor(color);
|
|
pass.shader.fixedColor.setColor(color);
|
|
pass.shader.fixedColor.w = alpha;
|
|
pass.shader.fixedColor.w = alpha;
|
|
pass.shader.smoothFixedColor = smoothColor;
|
|
pass.shader.smoothFixedColor = smoothColor;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ override function draw( ctx : RenderContext, t : h2d.Tile ) {
|
|
|
|
+ setParams();
|
|
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));
|