Răsfoiți Sursa

Drop Shadow : Do not create a temp texture for glow if quality == 0

Fl0xer 8 ani în urmă
părinte
comite
da1bccfed9
1 a modificat fișierele cu 3 adăugiri și 2 ștergeri
  1. 3 2
      h2d/filter/DropShadow.hx

+ 3 - 2
h2d/filter/DropShadow.hx

@@ -23,7 +23,8 @@ class DropShadow extends Glow {
 		setParams();
 		var save = ctx.textures.allocTarget("glowSave", ctx, t.width, t.height, false);
 		h3d.pass.Copy.run(t.getTexture(), save, None);
-		pass.apply(save, ctx.textures.allocTarget("glowTmp", ctx, t.width, t.height, false));
+		var glowTmpTex = (quality == 0) ? null : ctx.textures.allocTarget("glowTmp", ctx, t.width, t.height, false);
+		pass.apply(save, glowTmpTex);
 		var dx = Math.round(Math.cos(angle) * distance);
 		var dy = Math.round(Math.sin(angle) * distance);
 		alphaPass.getShader(h3d.shader.UVDelta).uvDelta.set(dx / t.width, dy / t.height);
@@ -34,4 +35,4 @@ class DropShadow extends Glow {
 		return ret;
 	}
 
-}
+}