tweak enviromentconfig

This commit is contained in:
Matteo Sonaglioni
2026-04-29 11:01:07 +02:00
parent 84538679f3
commit d8496f4cc7
5 changed files with 90 additions and 40 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;
}