shader_type canvas_item; // Fetches the screen texture with mipmaps enabled for the blur effect uniform sampler2D screen_texture : hint_screen_texture, repeat_disable, filter_linear_mipmap; // Allows you to adjust the blur strength in the inspector uniform float blur_amount : hint_range(0.0, 5.0) = 2.5; void fragment() { // Sample the screen texture at the current screen UV, using the blur_amount as the mipmap level (LOD) vec4 blurred_color = textureLod(screen_texture, SCREEN_UV, blur_amount); // Output the blurred color COLOR = blurred_color; }