shader_type canvas_item;

// Subtle soft vignette (darkens + slightly cools the screen corners).
uniform float strength : hint_range(0.0, 1.0) = 0.12;
uniform float radius : hint_range(0.2, 1.5) = 0.85;
uniform vec4 tint : source_color = vec4(0.25, 0.2, 0.4, 1.0);

void fragment() {
	vec2 p = (SCREEN_UV - 0.5) * vec2(SCREEN_PIXEL_SIZE.y / SCREEN_PIXEL_SIZE.x, 1.0) * 1.1;
	float v = smoothstep(radius * 0.45, radius, length(p));
	COLOR = vec4(tint.rgb, v * strength);
}
