[gd_scene load_steps=9 format=2] [ext_resource path="res://scripts/LoadingScene.gd" type="Script" id=1] [ext_resource path="res://resources/graphics/GUI/SelectLanguage/FirstRunBack.webp" type="Texture" id=2] [ext_resource path="res://resources/graphics/GUI/SelectLanguage/noise.webp" type="Texture" id=3] [ext_resource path="res://resources/fonts/OneEleven.ttf" type="DynamicFontData" id=4] [sub_resource type="Shader" id=11] code = "shader_type canvas_item; uniform sampler2D origin; uniform sampler2D noise; void fragment() { vec2 c = vec2(FRAGCOORD.x, FRAGCOORD.y); vec2 res = vec2(1.0 / SCREEN_PIXEL_SIZE.x,1.0 / SCREEN_PIXEL_SIZE.y); vec2 u = c / res.xy, n = texture(noise, u * .1).rg; // Displacement vec4 f = textureLod(origin, u, 2.5); // Loop through the different inverse sizes of drops for (float r = 4. ; r > 0. ; r--) { vec2 x = res.xy * r * .015, // Number of potential drops (in a grid) p = 6.28 * u * x + (n - .5) * 2., s = sin(p); // Current drop properties. Coordinates are rounded to ensure a // consistent value among the fragment of a given drop. vec4 d = texture(noise, round(u * x - 0.25) / x); // Drop shape and fading float t = (s.x+s.y) * max(0., 1. - fract(TIME * (d.b + .1) + d.g) * 2.); // d.r -> only x% of drops are kept on, with x depending on the size of drops if (d.r < (5.-r)*.08 && t > .5) { // Drop normal vec3 v = normalize(-vec3(cos(p), mix(.2, 2., t-.5))); // fragColor = vec4(v * 0.5 + 0.5, 1.0); // show normals // Poor man's refraction (no visual need to do more) f = texture(origin, u - v.xy * .3); if(f.r == 1.0 && f.g == 1.0 && f.b == 1.0){ f.a = 0.0 } } COLOR = f; } }" [sub_resource type="ShaderMaterial" id=12] resource_local_to_scene = true shader = SubResource( 11 ) shader_param/origin = ExtResource( 2 ) shader_param/noise = ExtResource( 3 ) [sub_resource type="DynamicFont" id=13] size = 100 outline_size = 7 outline_color = Color( 0, 0, 0, 1 ) use_filter = true font_data = ExtResource( 4 ) [sub_resource type="DynamicFont" id=14] size = 35 outline_size = 3 outline_color = Color( 0, 0, 0, 1 ) use_filter = true font_data = ExtResource( 4 ) [node name="Loading" type="Node2D"] z_index = 4001 script = ExtResource( 1 ) [node name="Polygon2D" type="Polygon2D" parent="."] material = SubResource( 12 ) polygon = PoolVector2Array( 0, 0, 1920, 0, 1920, 1080, 0, 1080 ) [node name="Text" type="Label" parent="."] margin_right = 1920.0 margin_bottom = 1080.0 custom_fonts/font = SubResource( 13 ) text = "Loading..." align = 1 valign = 1 [node name="ExitLabel" type="Label" parent="."] visible = false anchor_top = 1.0 anchor_right = 1.0 anchor_bottom = 1.0 margin_top = 1024.0 margin_right = 1920.0 margin_bottom = 1080.0 custom_fonts/font = SubResource( 14 ) text = "If the game takes a long time to close, use Task Manager to end the process." align = 1 valign = 1