Dual Kawase Down – Fast Blur
Fast blur shader as explained here: https://blog.frost.kiwi/dual-kawase/#dual-kawase-blur
Instructions:
- Add a ColorRect that spans the whole screen (or at least the area you want to blur).
- Add this shader to the material.
Other versions:
- Dual Kawase Down: This shader
- Dual Kawase Up: https://godotshaders.com/shader/dual-kawase-up-fast-blur/
Shader code
shader_type canvas_item;
uniform float offset: hint_range(0.0, 10.0);
uniform sampler2D SCREEN_TEXTURE : hint_screen_texture, filter_linear_mipmap;
void fragment() {
vec2 uv = UV;
vec2 halfpixel = SCREEN_PIXEL_SIZE / 2.0;
vec4 sum = texture(SCREEN_TEXTURE, uv) * 4.0;
sum += texture(SCREEN_TEXTURE, uv - halfpixel.xy * offset);
sum += texture(SCREEN_TEXTURE, uv + halfpixel.xy * offset);
sum += texture(SCREEN_TEXTURE, uv + vec2(halfpixel.x, -halfpixel.y) * offset);
sum += texture(SCREEN_TEXTURE, uv - vec2(halfpixel.x, -halfpixel.y) * offset);
COLOR = sum / 8.0;
}

