breadwinner/resources/shaders/blur_shader.gdshader

10 lines
381 B
Text
Raw Permalink Normal View History

2026-07-26 15:03:12 +02:00
shader_type canvas_item;
// filter_linear_mipmap tells Godot to generate the blurred layers!
uniform sampler2D screen_texture : hint_screen_texture, filter_linear_mipmap;
uniform float blur_amount : hint_range(0.0, 5.0) = 2.0;
2026-07-26 15:03:12 +02:00
void fragment() {
// textureLod grabs the pre-blurred image directly. No loops required!
COLOR = textureLod(screen_texture, SCREEN_UV, blur_amount);
2026-07-26 15:03:12 +02:00
}