diff --git a/src/UI/UI.gd b/src/UI/UI.gd index 8bb061e26..bdfc99df1 100644 --- a/src/UI/UI.gd +++ b/src/UI/UI.gd @@ -18,6 +18,9 @@ func _on_main_canvas_visibility_changed() -> void: func update_transparent_shader() -> void: # Works independently of the transparency feature + var canvas_size: Vector2 = (main_canvas_container.rect_size - Vector2.DOWN * 2) * Global.shrink material.set("shader_param/screen_resolution", get_viewport().size) - material.set("shader_param/position", main_canvas_container.rect_global_position) - material.set("shader_param/size", main_canvas_container.rect_size - Vector2.ONE * 2) + material.set( + "shader_param/position", main_canvas_container.rect_global_position * Global.shrink + ) + material.set("shader_param/size", canvas_size)