Level Up / Heal Light Pillar (2D, procedural, one-shot or always-on)
A light pillar for level ups, heals, buffs and save points in Godot 4. The beam shoots up from the ground with a flash and a ground ring burst, light streaks flow upward, sparkles drift up and rings climb the pillar. Fully procedural, no textures.
One parameter (progress) plays it as a one-shot: 0 = off, 0 to 0.22 the beam rises, then it holds, 0.72 to 1 it fades out. Leave progress at 0.5 for an always-on aura.
Tested by hand in Godot 4.7 with the Compatibility renderer, so it also works in web exports. It loops seamlessly every 2 seconds at speed 1.
How to use (2D)
- Add a ColorRect (or Sprite2D / TextureRect), about twice as tall as it is wide (for example 256 x 512), centred on your character’s feet.
- Give it a ShaderMaterial with this shader.
- Set rect_aspect to height / width of the rect (2.0 for 256 x 512) so sparkles and rings stay round.
- Pick color_main and color_core (gold = level up, green = heal, blue = buff/mana).
- For a one-shot, tween progress from 0 to 1 over about 1.5 seconds.
Tips
- ground_y moves the ground line (0.9 = 10% of the rect below the feet for the ground glow).
- rings 0 to 5, ring_perspective small = side view, 1 = seen from above.
- beam_width, beam_height, energy, speed, sparkle_amount and ground_glow are all adjustable.
- The alpha follows the brightness, so the glow adds light on top of anything and never darkens the background. It also fades before the edges of the rect, so you never see a square cut.
Using it in 3D
Put the ColorRect inside a SubViewport (transparent_bg on, 256×512), then show the viewport texture on a QuadMesh standing on the ground. In the quad’s material use blend_premul_alpha and unshaded, for example:
shader_type spatial;
render_mode unshaded, cull_disabled, depth_draw_never, blend_premul_alpha;
uniform sampler2D tex : source_color;
void fragment() { vec4 c = texture(tex, UV); ALBEDO = c.rgb * 1.2; ALPHA = c.a; }
If the floor cuts off the lower half of the ground glow, move the quad a little toward the camera (the demo adds depth_test_disabled because nothing stands in front of it).
Code written with AI assistance, tested by hand in Godot 4.7.
If you want heals, buffs, auras and 1,600+ more effects already set up for Godot 4: https://pixeldreamerstd.gumroad.com/l/vfxcol?utm_source=godotshaders
Shader code
// Level Up / Heal Light Pillar (2D, procedural, one-shot or always-on) — Pixel Dreamer Studio · MIT
// canvas_item shader: put it on a ColorRect / Sprite2D / TextureRect (a tall rect works best, e.g. 256 x 512).
// No textures needed. Beam rises from the ground, streaks flow up, sparkles drift up,
// rings climb the pillar and a ground ring bursts out.
// `progress`: 0 = off · 0 -> 0.22 beam shoots up (with a flash) · hold · 0.72 -> 1 fades out.
// Leave `progress` at 0.5 for an always-on aura (heal zone, buff, save point).
// Works in the Compatibility renderer (web exports too). Loops seamlessly every 2 s at speed 1.
shader_type canvas_item;
uniform vec4 color_main : source_color = vec4(1.0, 0.76, 0.28, 1.0);
uniform vec4 color_core : source_color = vec4(1.0, 0.97, 0.86, 1.0);
uniform float progress : hint_range(0.0, 1.0) = 0.5;
uniform float beam_width : hint_range(0.02, 0.45) = 0.2; // half width, fraction of rect width
uniform float beam_height : hint_range(0.1, 1.0) = 0.95; // fraction of the space above the ground
uniform float ground_y : hint_range(0.5, 1.0) = 0.9; // where the ground is (0 = top of rect, 1 = bottom)
uniform float rect_aspect : hint_range(0.25, 4.0) = 2.0; // rect height / width (keeps sparkles and rings round)
uniform float energy : hint_range(0.0, 3.0) = 0.9;
uniform float speed : hint_range(0.0, 3.0) = 1.0;
uniform float sparkle_amount : hint_range(0.0, 1.0) = 0.42;
uniform int rings : hint_range(0, 5) = 3; // rings climbing the pillar
uniform float ring_perspective : hint_range(0.05, 1.0) = 0.28; // 1 = seen from above, small = side view
uniform float ground_glow : hint_range(0.0, 2.0) = 1.0;
const float NY = 4.0; // noise period along the flow (keeps TIME small, seamless loop)
const float SY = 7.0; // sparkle rows per loop
float hash(vec2 p) {
p = fract(p * vec2(123.34, 456.21));
p += dot(p, p + 45.32);
return fract(p.x * p.y);
}
float pnoise(vec2 p, vec2 per) {
vec2 i = floor(p);
vec2 f = fract(p);
vec2 u = f * f * (3.0 - 2.0 * f);
float a = hash(mod(i, per));
float b = hash(mod(i + vec2(1.0, 0.0), per));
float c = hash(mod(i + vec2(0.0, 1.0), per));
float d = hash(mod(i + vec2(1.0, 1.0), per));
return mix(mix(a, b, u.x), mix(c, d, u.x), u.y);
}
float fbm(vec2 p, vec2 per) {
float v = 0.0;
float a = 0.55;
for (int k = 0; k < 3; k++) {
v += a * pnoise(p, per);
p *= 2.0;
per *= 2.0;
a *= 0.5;
}
return v;
}
// 4-point star (sparkle) at distance d, size s
float star(vec2 d, float s) {
vec2 a = abs(d) / s;
float cross_ = max(exp(-a.x * 9.0 - a.y * 1.6), exp(-a.y * 9.0 - a.x * 1.6));
float dot_ = exp(-dot(a, a) * 6.0);
return max(cross_, dot_);
}
void fragment() {
float pr = clamp(progress, 0.0, 1.0);
float rise = smoothstep(0.0, 0.22, pr);
float fade = (1.0 - smoothstep(0.72, 1.0, pr)) * step(0.0005, pr);
float flash = smoothstep(0.0, 0.04, pr) * (1.0 - smoothstep(0.06, 0.32, pr));
// P = position in "rect width" units, ground at y = 0, up = +y
float x = UV.x - 0.5;
float H = ground_y * rect_aspect; // space above the ground, in width units
float y = (ground_y - UV.y) * rect_aspect;
float v = y / H; // 0 ground .. 1 top of rect
float top = beam_height * rise;
float w = beam_width * (1.0 + 0.55 * flash) * mix(1.0, 0.45, smoothstep(0.75, 1.0, pr));
float wv = w * mix(1.0, 0.72, clamp(v, 0.0, 1.0));
float ax = abs(x) / max(wv, 1e-4);
// beam body: bright core + soft halo, streaks flowing up
float t = mod(TIME * 2.0 * speed, NY);
float n = fbm(vec2(x / max(wv, 1e-4) * 3.5 + 17.0, v * 3.0 - t), vec2(97.0, NY));
float streak = 0.45 + 1.1 * n * n;
float vm = smoothstep(-0.015, 0.03, v) * (1.0 - smoothstep(top * 0.7, top + 0.001, v));
float core = exp(-ax * ax * 3.0) * (0.45 + 0.55 * n) * 0.8;
float halo = exp(-ax * ax * 0.9) * 0.5 * streak;
float beam = (core + halo) * vm;
// sparkles drifting up (positional twinkle = loop-safe)
float sp = 0.0;
float spread = 1.0 - smoothstep(wv * 1.4, wv * 2.8, abs(x));
float ts = mod(TIME * 3.5 * speed, SY);
for (int k = 0; k < 2; k++) {
float kk = float(k);
vec2 sc = vec2(x * 16.0 + kk * 0.5, v * SY - ts + kk * 0.37);
vec2 cell = floor(sc);
vec2 f = fract(sc);
vec2 cm = mod(cell, vec2(997.0, SY));
float h = hash(cm + 3.1 + kk * 11.0);
vec2 jit = 0.25 + 0.5 * vec2(hash(cm + 1.7 + kk), hash(cm + 5.3 + kk));
vec2 d = (f - jit) * vec2(1.0 / 16.0, H / SY);
float life = clamp(v / max(top, 1e-3), 0.0, 1.0);
float tw = sin(life * 3.14159) * (0.6 + 0.4 * sin(h * 40.0 + life * 9.0));
sp += step(h, sparkle_amount) * star(d, 0.022 + 0.014 * h) * max(tw, 0.0);
}
sp *= spread * smoothstep(0.0, 0.05, v) * (1.0 - smoothstep(top * 0.8, top + 0.05, v));
// rings climbing the pillar
float rg = 0.0;
for (int k = 0; k < 5; k++) {
if (k >= rings) break;
float ry = fract(TIME * 0.5 * speed + float(k) / float(max(rings, 1)));
float yk = ry * top * 0.85 * H;
float rx = wv * (2.1 - 0.7 * ry);
float e = length(vec2(x / rx, (y - yk) / (rx * ring_perspective)));
float front = (y - yk) < 0.0 ? 1.0 : 0.55; // near side brighter
rg += exp(-pow((e - 1.0) / 0.09, 2.0)) * sin(ry * 3.14159) * front;
}
// ground: soft pool + ring bursting out at the start
float ge = length(vec2(x / (wv * 2.4), y / (wv * 2.4 * ring_perspective)));
float pool = exp(-ge * ge * 2.6) * 0.7 * ground_glow;
float br = wv * mix(1.4, 5.5, smoothstep(0.0, 0.45, pr));
float be = length(vec2(x / br, y / (br * ring_perspective)));
float burst = exp(-pow((be - 1.0) / 0.06, 2.0)) * (1.0 - smoothstep(0.1, 0.48, pr)) * step(0.0005, pr) * ground_glow;
vec3 col = color_main.rgb * (halo * vm * 1.2 + pool + rg * 1.3 + burst * 1.6);
col += color_core.rgb * core * vm * (1.0 + flash * 1.5);
col += mix(color_main.rgb, vec3(1.0), 0.65) * sp * 1.6;
col *= energy;
// soft fade before the rect edges (no square cut)
float edge = (1.0 - smoothstep(0.38, 0.5, abs(x))) * (1.0 - smoothstep(0.93, 1.0, 1.0 - UV.y)) * (1.0 - smoothstep(0.95, 1.0, UV.y));
col *= edge * fade;
// light-like output: alpha follows brightness, so the glow adds light and never darkens the background
float a = clamp(max(col.r, max(col.g, col.b)), 0.0, 1.0);
COLOR = vec4(col / max(a, 1e-4), a);
}


Comments 1
Really Nice!