2026-07-26 15:03:12 +02:00
|
|
|
shader_type canvas_item;
|
|
|
|
|
|
2026-08-07 12:29:40 +02:00
|
|
|
// filter_linear_mipmap tells Godot to generate the blurred layers!
|
2026-08-06 18:32:01 +02:00
|
|
|
uniform sampler2D screen_texture : hint_screen_texture, filter_linear_mipmap;
|
2026-08-07 12:29:40 +02:00
|
|
|
uniform float blur_amount : hint_range(0.0, 5.0) = 2.0;
|
2026-07-26 15:03:12 +02:00
|
|
|
|
|
|
|
|
void fragment() {
|
2026-08-07 12:29:40 +02:00
|
|
|
// 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
|
|
|
}
|