Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Shader Vignette Godot 4 (ColorRect)
- shader_type canvas_item;
- uniform float alpha = 1.0;
- uniform float inner_radius = 0.0;
- uniform float outer_radius = 1.0;
- void fragment() {
- float x = abs(UV.r-.5)*2.0;
- float y = abs(UV.g-.5)*2.0;
- float q = 1.0-(1.0-sqrt(x*x+y*y)/outer_radius)/(1.0-inner_radius);
- COLOR = vec4(0, 0, 0, q*alpha);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement