logo80lv
Articlesclick_arrow
Talentsclick_arrow
Events
Workshops
Aboutclick_arrow
profile_login
Log in
0
Save
Copy Link
Share

How to Make Neat Blur Shader in Godot

Binbun shows how to use mipmaps.

Making a blur shader in Godot is not that hard, as proven by technical artist Binbun, who wrote a nice tutorial on the matter. 

The creator explains that usually, more blur means less performance, but you won't have this issue in Godot because of mipmaps, a sequence of low-resolution versions of textures, which are used automatically in the engine.

To make the effect above, you'll need to create a ShaderMaterial and add it to the material slot of any Canvas Item. Then, the code is short, but if you want to dive deeper into the parameters, check out the whole tutorial.

shader_type canvas_item;

uniform float blur_amount : hint_range(0.0, 8.0) = 2.0;

uniform sampler2D screen_texture : hint_screen_texture, filter_linear_mipmap;

void fragment() {
 vec4 color = textureLod(screen_texture, SCREEN_UV, blur_amount);
 COLOR = color;
}

Binbun has several other guides that will teach you things like toon shading, generating shapes using UV in Godot shaders, and more.

Don't forget to subscribe to our Newsletter and join our 80 Level Talent platform, follow us on TwitterLinkedInTelegram, and Instagram, where we share breakdowns, the latest news, awesome artworks, and more.

Ready to grow your game’s revenue?
Talk to us

Comments

0

arrow
Type your comment here
Leave Comment
Ready to grow your game’s revenue?
Talk to us

We need your consent

We use cookies on this website to make your browsing experience better. By using the site you agree to our use of cookies.Learn more