Squashed commit of the following:

commit d8496f4cc7
Author: Matteo Sonaglioni <sonaglioni.matteo7@gmail.com>
Date:   Wed Apr 29 11:01:07 2026 +0200

    tweak enviromentconfig

commit 84538679f3
Author: Matteo Sonaglioni <sonaglioni.matteo7@gmail.com>
Date:   Wed Apr 29 09:29:48 2026 +0200

    museum_map
This commit is contained in:
Matteo Sonaglioni
2026-04-29 11:02:24 +02:00
parent b868584b78
commit ead4e557c4
5 changed files with 497 additions and 33 deletions

View File

@@ -1,9 +1,17 @@
shader_type canvas_item;
// Cattura tutto quello che c'è sotto questo nodo
uniform sampler2D screen_texture : hint_screen_texture, filter_linear_mipmap;
uniform float blur_amount : hint_range(0.0, 5.0) = 2.5;
uniform float focus_size : hint_range(0.0, 1.0) = 0.4;
uniform float transition_softness : hint_range(0.01, 1.0) = 0.3;
void fragment() {
COLOR = textureLod(screen_texture, SCREEN_UV, blur_amount);
}
float dist_from_center = abs(SCREEN_UV.y - 0.5);
float mask = smoothstep(focus_size / 2.0, (focus_size / 2.0) + transition_softness, dist_from_center);
// Applica il blur
vec4 blurred_screen = textureLod(screen_texture, SCREEN_UV, blur_amount * mask);
COLOR = blurred_screen;
}