This repository has been archived on 2024-04-19. You can view files and clone it, but cannot push or open issues or pull requests.
Jessist/Shaders/blur.shader

18 lines
414 B
Text
Raw Normal View History

2022-06-18 13:05:48 +02:00
shader_type canvas_item;
render_mode blend_mix;
uniform float radius = 4.0;
void fragment() {
vec4 col = texture(TEXTURE, UV);
vec2 ps = TEXTURE_PIXEL_SIZE;
col += texture(TEXTURE, UV + vec2(0.0, -radius) * ps);
col += texture(TEXTURE, UV + vec2(0.0, radius) * ps);
col += texture(TEXTURE, UV + vec2(-radius, 0.0) * ps);
col += texture(TEXTURE, UV + vec2(radius, 0.0) * ps);
col /= 5.0;
COLOR = col;
}