shader_type canvas_item; // Faint red gradient hugging the screen edges, flashed on a hit. `flash` is tweened // 0.9 → 0 by the HUD; the vignette is transparent in the centre and reddens toward // the corners so the middle of the screen stays clear. uniform float flash : hint_range(0.0, 1.0) = 0.0; uniform vec3 tint : source_color = vec3(0.75, 0.0, 0.0); uniform float inner : hint_range(0.0, 1.0) = 0.45; uniform float outer : hint_range(0.0, 1.0) = 1.0; void fragment() { // Distance from centre normalised so the corners land at ~1.0. float dist = length(UV - vec2(0.5)) / 0.70710678; float v = smoothstep(inner, outer, dist); COLOR = vec4(tint, v * flash); }