process_priority fixes! + moon.gdshader time_add (:

This commit is contained in:
Harmony Honey 2023-04-26 01:20:28 -04:00
parent cd1b9a0f29
commit 6b752fe43c
8 changed files with 8 additions and 3 deletions

View file

@ -20,6 +20,7 @@ extents = Vector2( 30, 30 )
extents = Vector2( 49.9, 49.9 )
[node name="Box" type="KinematicBody2D" groups=["box"]]
process_priority = -5
position = Vector2( 50, 50 )
z_index = 30
z_as_relative = false

View file

@ -7,6 +7,7 @@
extents = Vector2( 35, 35 )
[node name="Goal" type="Node2D" groups=["goal"]]
process_priority = -1
z_index = 90
z_as_relative = false
script = ExtResource( 1 )

View file

@ -13,11 +13,11 @@ var _delta := 1.0 / 60.0
func _ready():
visible = false
get_tree().connect("idle_frame", self, "place")
Shared.connect("scene_changed", self, "set_box")
func _process(delta):
_delta = delta
place()
func set_box(b = null):
is_deploy = is_instance_valid(b)

View file

@ -11,6 +11,7 @@ shader_param/col1 = Color( 0, 0.380392, 1, 1 )
shader_param/col2 = Color( 0, 0.921569, 1, 1 )
[node name="Mirror" type="Node2D"]
process_priority = 10
z_index = -5
script = ExtResource( 1 )
offset = Vector2( 70, 0 )

View file

@ -11,6 +11,7 @@ shader_param/steps = 8.0
shader_param/aspect = 0.5625
[node name="Cam" type="Camera2D" groups=["game_camera"]]
process_priority = 50
rotating = true
current = true
script = ExtResource( 1 )

View file

@ -293,7 +293,6 @@ round_precision = 5
[node name="Line2D8" type="Line2D" parent="Sky/Center/Stars/Orbit/Sun"]
rotation = -0.785405
scale = Vector2( 1, 1 )
points = PoolVector2Array( 75, 0, 100, 0 )
width = 30.0
width_curve = SubResource( 22 )

View file

@ -48,6 +48,7 @@ layer = 2
follow_viewport_enable = true
[node name="Guide" type="Node2D" parent="GuideLayer"]
process_priority = 100
light_mask = 0
script = ExtResource( 10 )

View file

@ -12,6 +12,7 @@ uniform vec4 col2 : hint_color = vec4(0.0);
uniform float sun_frac : hint_range(0.0, 1.0) = 0.0;
uniform float time_scale : hint_range(0.0, 0.05) = 1.0;
uniform float time_add : hint_range(0.0, 10.0) = 0.0;
vec3 blendAddy(vec3 base, vec3 blend) {
return min(base+blend,vec3(1.0));
@ -23,7 +24,7 @@ vec3 blendAdd(vec3 base, vec3 blend, float opacity) {
void fragment(){
vec4 c = mix(col2, col1, SCREEN_UV.y);
float f = mod(TIME * time_scale, 2.0) - 0.5;
float f = mod(time_add + (TIME * time_scale), 2.0) - 0.5;
vec4 nc = mix(outside_color, inside_color, float(distance(vec2(f, 0.5), UV) < radius));
COLOR = mix(vec4(blendAdd(c.rgb, nc.rgb, nc.a), 1.0), sun_color, sun_frac);