116 lines
3.5 KiB
Text
116 lines
3.5 KiB
Text
[gd_scene load_steps=11 format=2]
|
|
|
|
[ext_resource path="res://scripts/SelectLanguageScene.gd" type="Script" id=1]
|
|
[ext_resource path="res://resources/graphics/GUI/SelectLanguage/noise.webp" type="Texture" id=2]
|
|
[ext_resource path="res://resources/graphics/GUI/SelectLanguage/FirstRunBack.webp" type="Texture" id=3]
|
|
[ext_resource path="res://resources/Themes/EmptyFocusTheme.tres" type="StyleBox" 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=10]
|
|
resource_local_to_scene = true
|
|
shader = SubResource( 11 )
|
|
shader_param/origin = ExtResource( 3 )
|
|
shader_param/noise = ExtResource( 2 )
|
|
|
|
[sub_resource type="DynamicFontData" id=1]
|
|
font_path = "res://resources/fonts/OneEleven.ttf"
|
|
|
|
[sub_resource type="DynamicFont" id=2]
|
|
size = 70
|
|
outline_size = 5
|
|
outline_color = Color( 0, 0, 0, 1 )
|
|
use_mipmaps = true
|
|
use_filter = true
|
|
font_data = SubResource( 1 )
|
|
|
|
[sub_resource type="DynamicFontData" id=3]
|
|
font_path = "res://resources/fonts/OneEleven.ttf"
|
|
|
|
[sub_resource type="DynamicFont" id=4]
|
|
size = 70
|
|
outline_size = 5
|
|
outline_color = Color( 0, 0, 0, 1 )
|
|
use_mipmaps = true
|
|
use_filter = true
|
|
font_data = SubResource( 3 )
|
|
|
|
[node name="SelectLanguageScene" type="Node2D"]
|
|
script = ExtResource( 1 )
|
|
|
|
[node name="Polygon2D" type="Polygon2D" parent="."]
|
|
material = SubResource( 10 )
|
|
polygon = PoolVector2Array( 0, 0, 3840, 0, 3840, 2160, 0, 2160 )
|
|
|
|
[node name="Texts" type="VBoxContainer" parent="."]
|
|
margin_right = 223.0
|
|
margin_bottom = 292.0
|
|
size_flags_horizontal = 2
|
|
size_flags_vertical = 2
|
|
custom_constants/separation = 108
|
|
alignment = 1
|
|
|
|
[node name="English" type="Button" parent="Texts"]
|
|
margin_right = 223.0
|
|
margin_bottom = 92.0
|
|
custom_colors/font_color = Color( 1, 1, 1, 1 )
|
|
custom_colors/font_color_hover = Color( 0, 0, 0, 1 )
|
|
custom_fonts/font = SubResource( 2 )
|
|
custom_styles/focus = ExtResource( 4 )
|
|
text = "ENGLISH"
|
|
flat = true
|
|
|
|
[node name="Russian" type="Button" parent="Texts"]
|
|
margin_top = 200.0
|
|
margin_right = 223.0
|
|
margin_bottom = 292.0
|
|
custom_colors/font_color = Color( 1, 1, 1, 1 )
|
|
custom_colors/font_color_hover = Color( 0, 0, 0, 1 )
|
|
custom_fonts/font = SubResource( 4 )
|
|
custom_styles/focus = ExtResource( 4 )
|
|
text = "РУССКИЙ"
|
|
flat = true
|