Wicked-Depths/blur.gdshader

15 lines
466 B
Plaintext
Raw Normal View History

shader_type canvas_item;
uniform float blur_amount : hint_range(0, 5);
uniform sampler2D SCREEN_TEXTURE : hint_screen_texture, filter_linear_mipmap;
uniform vec4 color: source_color;
uniform float multiplier = 0.2;
uniform float softness = 3.0;
void fragment() {
float value = distance(UV, vec2(0.5)) * -1.0;
// COLOR = textureLod(SCREEN_TEXTURE, SCREEN_UV, blur_amount);
COLOR = textureLod(SCREEN_TEXTURE,SCREEN_UV, smoothstep(softness, multiplier,value));
}