Simple Blur Godot 4.1

A simple BLRU Shader based on this shader for Godot 4.1

Shader code
shader_type canvas_item;

uniform float blur_amount : hint_range(-2.0, 10.0);
uniform float mix_amount : hint_range(0.0, 1.0);
uniform vec4 color_over : source_color;
uniform sampler2D SCREEN_TEXTURE : hint_screen_texture, filter_linear_mipmap;

void fragment() {
   vec4 blurred = textureLod(SCREEN_TEXTURE, SCREEN_UV, blur_amount);
   blurred.a = 255.0;
   vec4 fin = mix(blurred, color_over, mix_amount);
   COLOR = fin;
}
Tags
blur
The shader code and all code snippets in this post are under CC0 license and can be used freely without the author's permission. Images and videos, and assets depicted in those, do not fall under this license. For more info, see our License terms.

Related shaders

Simple blur with CanvasGroup support

Simple Blur

Simple blur, mixed with a color

Subscribe
Notify of
guest

5 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
oxorfr
oxorfr
3 months ago

currently the best blur that i could find. almost doesn’t affect performance

lechatonmortel
lechatonmortel
1 month ago

On Godot 4.4 is dont work well for me :/

UnrealSoftware
UnrealSoftware
28 days ago
Reply to  lechatonmortel

It works fine with Godot 4.4 for me. Maybe something is wrong with your setup?

Saniori
Saniori
18 days ago

Not working in godot 4.4

kesha2326
kesha2326
15 days ago

In version 4.4, everything works like a charm — you just need to set the blur amount in the shader parameters