1
- [gd_scene load_steps =5 format =2 ]
1
+ [gd_scene load_steps =8 format =2 ]
2
2
3
3
[ext_resource path ="res://Scenes/Maps/Map.gd" type ="Script" id =1 ]
4
4
[ext_resource path ="res://Sprites/Maps/None_Albedo_1001.png" type ="Texture" id =2 ]
5
+ [ext_resource path ="res://Sprites/white_256.png" type ="Texture" id =3 ]
5
6
6
- [sub_resource type ="RectangleShape2D" id =1 ]
7
+ [sub_resource type ="Shader" id =1 ]
8
+ code = "shader_type canvas_item ;
9
+
10
+ uniform vec4 void_color : hint_color ;
11
+ uniform bvec4 border_flags ;
12
+ uniform float border = 0.01 ;
13
+ uniform float offset = 0.1 ;
14
+
15
+ void fragment (){
16
+ float _border = border + offset ;
17
+ COLOR = vec4 (0.0 ,0.0 ,0.0 ,0.0 );
18
+ if (UV .x <= _border && border_flags [0 ]){
19
+ float dis = (0.5 - abs (UV .x - 0.5 + (- offset )))* (1.0 / border );
20
+ COLOR = mix (COLOR ,void_color ,clamp (1.0 - dis ,0 ,1 ));
21
+ }else {
22
+ if (UV .x >= 1.0f - _border && border_flags [1 ]){
23
+ float dis = (0.5 - abs (UV .x - 0.5 + (offset )))* (1.0 / border );
24
+ COLOR = mix (COLOR ,void_color ,clamp (1.0 - dis ,0 ,1 ));
25
+ }
26
+ }
27
+ if (UV .y <= _border && border_flags [2 ]) {
28
+ float dis = (0.5 - abs (UV .y - 0.5 + (- offset )))* (1.0 / border );
29
+ COLOR = mix (COLOR ,void_color ,clamp (1.0 - dis ,0 ,1 ));
30
+ }else {
31
+ if (UV .y >= 1.0f - _border && border_flags [3 ]) {
32
+ float dis = (0.5 - abs (UV .y - 0.5 + (offset )))* (1.0 / border );
33
+ COLOR = mix (COLOR ,void_color ,clamp (1.0 - dis ,0 ,1 ));
34
+ }
35
+ }
36
+ }"
37
+
38
+ [sub_resource type ="ShaderMaterial" id =3 ]
39
+ shader = SubResource ( 1 )
40
+ shader_param/void_color = Color ( 0 , 0 , 0 , 1 )
41
+ shader_param/border_flags = 15
42
+ shader_param/border = 0.059
43
+ shader_param/offset = 0.115
44
+
45
+ [sub_resource type ="RectangleShape2D" id =4 ]
7
46
extents = Vector2 ( 7270.57 , 22.7852 )
8
47
9
48
[sub_resource type ="RectangleShape2D" id =2 ]
@@ -18,17 +57,24 @@ scale = Vector2( 3.55498, -3.88244 )
18
57
z_index = -8
19
58
texture = ExtResource ( 2 )
20
59
60
+ [node name ="VoidOverlay" type ="Sprite" parent ="." ]
61
+ material = SubResource ( 3 )
62
+ position = Vector2 ( -27.3862 , -11.1858 )
63
+ scale = Vector2 ( 56.7305 , -61.8465 )
64
+ z_index = 20
65
+ texture = ExtResource ( 3 )
66
+
21
67
[node name ="StaticBody2D" type ="StaticBody2D" parent ="." ]
22
68
position = Vector2 ( 4 .19617e-05, -2 .86102e-06 )
23
69
collision_layer = 2
24
70
25
71
[node name ="CollisionShape2D4" type ="CollisionShape2D" parent ="StaticBody2D" ]
26
72
position = Vector2 ( -0.000976563 , 7125.12 )
27
- shape = SubResource ( 1 )
73
+ shape = SubResource ( 4 )
28
74
29
75
[node name ="CollisionShape2D" type ="CollisionShape2D" parent ="StaticBody2D" ]
30
76
position = Vector2 ( 0 , -7140.64 )
31
- shape = SubResource ( 1 )
77
+ shape = SubResource ( 4 )
32
78
33
79
[node name ="CollisionShape2D3" type ="CollisionShape2D" parent ="StaticBody2D" ]
34
80
position = Vector2 ( -7158.96 , -14.9311 )
0 commit comments