Description

A vignette shader for Godot that darkens the corners of the screen to focus attention on the center.

Customization

  • Color: Change the color of the vignette.
  • Multiplier: Adjust the effect’s intensity.
  • Softness: Change the gradient transition.

Shader Code

shader_type canvas_item;

uniform vec4 color: hint_color;
uniform float multiplier = 0.2;
uniform float softness = 3.0;

void fragment() {
        float value = distance(UV, vec2(0.5));
        COLOR = vec4(color.rgb, smoothstep(multiplier, softness, value));
}

Video

External content from YouTube
Open video page