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;
}
Live Preview
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

Comments 6

  1. oxorfr

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

    5
  2. lechatonmortel

    On Godot 4.4 is dont work well for me :/

    0
  3. kesha2326

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

    2
  4. Works perfect for godot 4.4.1 2D Compatibility. I used it to add blurred background particles to my UI using particle2DCPU

    0