Vignette with changeable blur size

vignetter shader ported from shadertoy to godot4 with changeable blur size 

Shader code
//Vignette Shader

//see more info about shaders here -->
//ported with (with some hand fixing)
//on shadertoy

shader_type canvas_item;
uniform float size;

void fragment() {
	vec2 uv=UV;
	vec2 suv = abs(uv * 2.0 - 1.0);
	vec4 col = texture(TEXTURE, uv);
	vec2 u = vec2(size / (1.0/TEXTURE_PIXEL_SIZE));
	u = smoothstep(vec2(0), u, 1.0 - suv);
	COLOR = col * u.x * u.y;
godot4, shader, vignette
This shader is a port from an existing Shadertoy project. Shadertoy shaders are by default protected under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported (CC BY-NC-SA 3.0) license unless anything else has been stated by the author. For more info, see our License terms.

More from TechnoLukas

Combine two Shaders

Related shaders

Blur Vignette (Post Processing / ColorRect) [Godot 4.2.1]

Chromatic Aberration Vignette

Player Vignette

Notify of

1 Comment
Newest Most Voted
Inline Feedbacks
View all comments
8 months ago

How Do i Apply it