Squashed commit of the following:
commitd8496f4cc7Author: Matteo Sonaglioni <sonaglioni.matteo7@gmail.com> Date: Wed Apr 29 11:01:07 2026 +0200 tweak enviromentconfig commit84538679f3Author: Matteo Sonaglioni <sonaglioni.matteo7@gmail.com> Date: Wed Apr 29 09:29:48 2026 +0200 museum_map
This commit is contained in:
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user