[gd_scene format=3 uid="uid://cmuvmmp7xam4o"]

[ext_resource type="Script" uid="uid://d27xbipk650kf" path="res://core/daynight/environment_manager.gd" id="1_wecen"]
[ext_resource type="Script" uid="uid://butda6k2tli3o" path="res://core/environment_config.gd" id="2_h6hjk"]
[ext_resource type="Shader" uid="uid://7vwkfffa5vao" path="res://core/daynight/clouds_shadow.gdshader" id="2_i3hjl"]
[ext_resource type="Shader" uid="uid://cq4vlcj8cuvge" path="res://core/daynight/fog.gdshader" id="2_r4tfj"]
[ext_resource type="PackedScene" uid="uid://dyxvcf2l8ba5x" path="res://core/daynight/god_ray.tscn" id="5_411rw"]
[ext_resource type="Shader" uid="uid://bb1jjwe31fl7o" path="res://core/daynight/wind.gdshader" id="5_djqkg"]
[ext_resource type="Material" uid="uid://codq5gx71rj4o" path="res://core/daynight/environment_dust_material.tres" id="8_amaf0"]
[ext_resource type="Shader" uid="uid://bkn6eqgbn37jx" path="res://core/daynight/blur.gdshader" id="9_amaf0"]
[ext_resource type="Shader" uid="uid://b5wa82soyhsqm" path="res://core/daynight/environment_shadows.gdshader" id="10_tuauy"]
[ext_resource type="Texture2D" uid="uid://b2xcpt2y8v32x" path="res://core/daynight/FogNoise.tres" id="11_tuauy"]
[ext_resource type="FastNoiseLite" uid="uid://c0mtwrkptjcuw" path="res://core/daynight/environment_shadows_noise_clouds.tres" id="11_yn8v8"]

[sub_resource type="ShaderMaterial" id="ShaderMaterial_ruhh7"]
render_priority = 0
shader = ExtResource("2_i3hjl")

[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_r4tfj"]
transparency = 2
alpha_scissor_threshold = 0.0
alpha_antialiasing_mode = 0
disable_ambient_light = true
albedo_color = Color(0.44410604, 0.32877246, 0.26597014, 0.7541567)
billboard_mode = 3
particles_anim_h_frames = 1
particles_anim_v_frames = 1
particles_anim_loop = false

[sub_resource type="ShaderMaterial" id="ShaderMaterial_b5atu"]
render_priority = 0
shader = ExtResource("2_r4tfj")
shader_parameter/use_red_as_alpha = true
shader_parameter/fog_color = Color(0.8, 0.85, 0.9, 0.5)
shader_parameter/fog_density = 0.25
shader_parameter/scroll_speed = Vector2(0.05, 0.01)
shader_parameter/texture_scale = Vector2(1, 1)
shader_parameter/edge_softness_y = 0.2
shader_parameter/edge_softness_x = 0.1
shader_parameter/night_intensity = 0.7953524793650795
shader_parameter/sun_color = Color(0.2841828, 0.2023238, 0.27953526, 1)

[sub_resource type="Resource" id="Resource_r4tfj"]
script = ExtResource("2_h6hjk")
morning_color = Color(0.93333334, 0.78039217, 0.6039216, 1)
afternoon_color = Color(0.9490196, 0.62352943, 0.38039216, 1)
night_color = Color(0.18431373, 0.18431373, 0.4862745, 1)
sun_rotation_morning = Vector3(-50, -90, 0)
sun_rotation_afternoon = Vector3(-120, -90, 0)
sun_rotation_night = Vector3(-130, -90, 0)
night_light_energy = 1.0
exposure_morning = 0.8
exposure_afternoon = 0.7
exposure_night = 0.7
sky_top_morning = Color(0.11764706, 0.35686275, 0.5411765, 1)
sky_top_afternoon = Color(0.7019608, 0.4509804, 0.2, 1)
sky_top_night = Color(0.050980393, 0.050980393, 0.14901961, 1)
sky_horizon_morning = Color(0.4627451, 0.6745098, 0.8627451, 1)
sky_horizon_afternoon = Color(0.93333334, 0.6, 0.8039216, 1)
sky_horizon_night = Color(0.14901961, 0.101960786, 0.2509804, 1)
grad_top_morning = Color(0.7921569, 0.8784314, 0.95686275, 1)
grad_top_afternoon = Color(0.8627451, 0.24313726, 0.5411765, 1)
grad_top_night = Color(0.16470589, 0.16470589, 0.26666668, 1)
grad_bot_morning = Color(0.05882353, 0.078431375, 0.21568628, 1)
grad_bot_afternoon = Color(0.2509804, 0.019607844, 0.043137256, 1)
grad_intensity_morning = 0.05
grad_intensity_afternoon = 0.1
grad_intensity_night = 0.5
fog_color_morning = Color(0.7490196, 0.8509804, 0.9490196, 1)
fog_color_afternoon = Color(0.9823975, 0.8034449, 0.8778439, 1)
fog_color_night = Color(0.38409987, 0.28720453, 0.5907528, 1)
fog_density_morning = 0.01
fog_density_afternoon = 0.02
glow_morning = 0.4
glow_night = 0.8
material_fog = SubResource("ShaderMaterial_b5atu")
material_drops = SubResource("StandardMaterial3D_r4tfj")
material_clouds = SubResource("ShaderMaterial_ruhh7")
lightning_color = Color(1, 0.9843137, 0.4627451, 1)
lightning_min = 2
lightning_max = 4
lightning_scale_min = 2.0
lightning_scale_max = 5.0
godray_max_rain = 30
godray_spawn_radius = 100.0
godray_spawn_offset = Vector3(20, 80, 20)
godray_rotation_degrees = Vector3(50, 30, 0)
godray_scale = Vector3(2, 25, 50)
snow_amount = 2000.0
wind_amount = 50
cloud_speed = 0.01
fireflies_amount = 550
fireflies_spawn_ray = 60.0
water_color_morning = Color(0.33333334, 0.654902, 0.5294118, 1)
water_color_afternoon = Color(0.5803922, 0.5137255, 0.2901961, 1)
water_color_night = Color(0.48235294, 0.45490196, 0.69411767, 1)
metadata/_custom_type_script = "uid://butda6k2tli3o"

[sub_resource type="Gradient" id="Gradient_i3hjl"]
offsets = PackedFloat32Array(0, 0.49019608, 1)
colors = PackedColorArray(0, 0, 0, 0, 1, 0.8980392, 0.3764706, 1, 1, 1, 1, 0)

[sub_resource type="GradientTexture1D" id="GradientTexture1D_djqkg"]
gradient = SubResource("Gradient_i3hjl")

[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_i3hjl"]
emission_shape = 3
emission_box_extents = Vector3(20, 3, 20)
gravity = Vector3(0, 0.2, 0)
color_ramp = SubResource("GradientTexture1D_djqkg")
turbulence_enabled = true

[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_djqkg"]
transparency = 1
vertex_color_use_as_albedo = true
emission_enabled = true
emission = Color(0.94509804, 0.827451, 0.09411765, 1)
emission_energy_multiplier = 16.0
billboard_mode = 3
particles_anim_h_frames = 1
particles_anim_v_frames = 1
particles_anim_loop = false

[sub_resource type="QuadMesh" id="QuadMesh_b5atu"]
material = SubResource("StandardMaterial3D_djqkg")
size = Vector2(0.1, 0.1)

[sub_resource type="Gradient" id="Gradient_djqkg"]
offsets = PackedFloat32Array(0, 0.491, 1)
colors = PackedColorArray(0, 0, 0, 0, 1, 1, 1, 0.7647059, 0, 0, 0, 0)

[sub_resource type="GradientTexture1D" id="GradientTexture1D_b5atu"]
gradient = SubResource("Gradient_djqkg")

[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_ruhh7"]
lifetime_randomness = 0.5
emission_shape_scale = Vector3(5, 5, 5)
emission_shape = 3
emission_box_extents = Vector3(1, 1, 1)
direction = Vector3(0, 1, 0)
initial_velocity_min = 6.0
initial_velocity_max = 6.0
gravity = Vector3(0, 0, 0)
color_ramp = SubResource("GradientTexture1D_b5atu")

[sub_resource type="Curve" id="Curve_b5atu"]
_data = [Vector2(0.00440529, 0.49729878), 0.0, 0.0, 0, 0, Vector2(0.4977974, 0.988911), 0.0, 0.0, 0, 0, Vector2(1, 0.50284326), 0.0, 0.0, 0, 0]
point_count = 3

[sub_resource type="ShaderMaterial" id="ShaderMaterial_cer0u"]
render_priority = 0
shader = ExtResource("5_djqkg")
shader_parameter/time_scale = 3.065
shader_parameter/wave_amplitude = 0.3
shader_parameter/wave_frequency = 0.25

[sub_resource type="TubeTrailMesh" id="TubeTrailMesh_vo82p"]
material = SubResource("ShaderMaterial_cer0u")
custom_aabb = AABB(20, 20, 20, 0, 0, 0)
radius = 0.06
radial_steps = 16
section_length = 2.0
curve = SubResource("Curve_b5atu")

[sub_resource type="Gradient" id="Gradient_b5atu"]
offsets = PackedFloat32Array(0, 0.1, 0.9, 1)
colors = PackedColorArray(1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0)

[sub_resource type="GradientTexture1D" id="GradientTexture1D_ruhh7"]
gradient = SubResource("Gradient_b5atu")

[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_cer0u"]
particle_flag_align_y = true
emission_shape_scale = Vector3(50, 10, 50)
emission_shape = 3
emission_box_extents = Vector3(1, 1, 1)
direction = Vector3(0, -1, 0)
spread = 0.0
initial_velocity_min = 2.5
initial_velocity_max = 5.0
gravity = Vector3(0, -2, 0)
scale_max = 10.0
color_ramp = SubResource("GradientTexture1D_ruhh7")

[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_b5atu"]
transparency = 1
emission_enabled = true
emission = Color(1, 1, 1, 1)
emission_energy_multiplier = 0.2
billboard_mode = 3
particles_anim_h_frames = 1
particles_anim_v_frames = 1
particles_anim_loop = false

[sub_resource type="QuadMesh" id="QuadMesh_ruhh7"]
material = SubResource("StandardMaterial3D_b5atu")
size = Vector2(0.2, 0.2)

[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_b5atu"]
particle_flag_align_y = true
emission_shape_scale = Vector3(50, 10, 50)
emission_shape = 3
emission_box_extents = Vector3(1, 1, 1)
direction = Vector3(0, -1, 0)
spread = 0.0
initial_velocity_min = 10.0
initial_velocity_max = 25.0
gravity = Vector3(0, -9, 0)

[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_ruhh7"]
transparency = 2
alpha_scissor_threshold = 0.5
alpha_antialiasing_mode = 0
disable_ambient_light = true
albedo_color = Color(0.4745098, 0.69411767, 0.7607843, 0.7411765)
billboard_mode = 3
particles_anim_h_frames = 1
particles_anim_v_frames = 1
particles_anim_loop = false

[sub_resource type="QuadMesh" id="QuadMesh_cer0u"]
material = SubResource("StandardMaterial3D_ruhh7")
size = Vector2(0.05, 0.8)

[sub_resource type="ShaderMaterial" id="ShaderMaterial_kavln"]
shader = ExtResource("9_amaf0")
shader_parameter/blur_amount = 0.50000002375
shader_parameter/focus_size = 0.54400002584
shader_parameter/transition_softness = 0.00999999977648

[sub_resource type="QuadMesh" id="QuadMesh_sxgg7"]
size = Vector2(2, 2)

[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_0fcg4"]
noise = ExtResource("11_yn8v8")
seamless = true

[sub_resource type="ShaderMaterial" id="ShaderMaterial_oqt1s"]
render_priority = -1
shader = ExtResource("10_tuauy")
shader_parameter/noise_texture = SubResource("NoiseTexture2D_0fcg4")
shader_parameter/cloud_scale = 0.0070000003325
shader_parameter/cloud_speed = 0.0030000001425
shader_parameter/direction = Vector2(0.1, 0.025)
shader_parameter/sun_angle = Vector2(0.5, 0.5)
shader_parameter/cloud_density = 0.400000019
shader_parameter/center_sharpness = 0.138000006555
shader_parameter/shadow_color = Color(0, 0, 0, 1)
shader_parameter/opacity_center = 0.90000004275
shader_parameter/opacity_edge = 0.6000000285
shader_parameter/fade_start = 150.0
shader_parameter/fade_end = 800.000035625
shader_parameter/height_fade_start = 10.0
shader_parameter/height_fade_end = 50.0

[sub_resource type="QuadMesh" id="QuadMesh_yn8v8"]
size = Vector2(2, 2)

[sub_resource type="ShaderMaterial" id="ShaderMaterial_sxgg7"]
render_priority = 2
shader = ExtResource("2_r4tfj")
shader_parameter/fog_noise = ExtResource("11_tuauy")
shader_parameter/use_red_as_alpha = true
shader_parameter/fog_color = Color(0.8, 0.8509804, 0.9019608, 0.2509804)
shader_parameter/fog_density = 0.25
shader_parameter/scroll_speed = Vector2(0, 0.01)
shader_parameter/texture_scale = Vector2(1, 1)
shader_parameter/edge_softness_y = 0.16400000779
shader_parameter/edge_softness_x = 0.5
shader_parameter/night_intensity = 0.0
shader_parameter/sun_color = Color(1, 1, 1, 1)

[node name="EnvironmentManager" type="Node3D" unique_id=1611939731 node_paths=PackedStringArray("particles_wind", "particles_snow", "particles_fireflies", "particles_rain", "environment_dust", "blur", "environment_shadows", "fog")]
script = ExtResource("1_wecen")
environment_config = SubResource("Resource_r4tfj")
particles_wind = NodePath("Particles_Wind")
particles_snow = NodePath("Particles_Snow")
particles_fireflies = NodePath("Particles_Fireflies")
particles_rain = NodePath("Particles_Rain")
godray = ExtResource("5_411rw")
environment_dust = NodePath("EnvironmentDust")
blur = NodePath("Blur")
environment_shadows = NodePath("EnvironmentCloudsShadows")
fog = NodePath("Fog")

[node name="Particles_Fireflies" type="GPUParticles3D" parent="." unique_id=947538133]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2, 0)
emitting = false
amount = 60
lifetime = 4.0
process_material = SubResource("ParticleProcessMaterial_i3hjl")
draw_pass_1 = SubResource("QuadMesh_b5atu")

[node name="Particles_Wind" type="GPUParticles3D" parent="." unique_id=1238214694]
transform = Transform3D(1, 0, 0, 0, -4.371139e-08, -1, 0, 1, -4.371139e-08, 0, 50, 0)
cast_shadow = 0
emitting = false
amount = 25
lifetime = 3.0
fixed_fps = 60
process_material = SubResource("ParticleProcessMaterial_ruhh7")
draw_pass_1 = SubResource("TubeTrailMesh_vo82p")

[node name="Particles_Snow" type="GPUParticles3D" parent="." unique_id=1877039876]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 30, 0)
extra_cull_margin = 16384.0
emitting = false
amount = 2000
lifetime = 4.0
process_material = SubResource("ParticleProcessMaterial_cer0u")
draw_pass_1 = SubResource("QuadMesh_ruhh7")

[node name="Particles_Rain" type="GPUParticles3D" parent="." unique_id=1543042897]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 30, 0)
cast_shadow = 0
extra_cull_margin = 16384.0
emitting = false
amount = 5000
lifetime = 1.5
process_material = SubResource("ParticleProcessMaterial_b5atu")
draw_pass_1 = SubResource("QuadMesh_cer0u")

[node name="EnvironmentDust" type="ColorRect" parent="." unique_id=1245348005]
material = ExtResource("8_amaf0")
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2

[node name="Blur" type="ColorRect" parent="." unique_id=809010331]
material = SubResource("ShaderMaterial_kavln")
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2

[node name="EnvironmentCloudsShadows" type="MeshInstance3D" parent="." unique_id=159549433]
extra_cull_margin = 16384.0
mesh = SubResource("QuadMesh_sxgg7")
surface_material_override/0 = SubResource("ShaderMaterial_oqt1s")

[node name="Fog" type="Node3D" parent="." unique_id=1626352238]

[node name="MeshInstance3D" type="MeshInstance3D" parent="Fog" unique_id=96635311]
transform = Transform3D(-42.075005, 7.553328e-06, 1.7196172e-13, 0, -3.7766642e-06, 45, 3.6783138e-06, 86.4, 1.9670128e-06, -41.926987, 14, 0)
mesh = SubResource("QuadMesh_yn8v8")
surface_material_override/0 = SubResource("ShaderMaterial_sxgg7")

[node name="MeshInstance3D2" type="MeshInstance3D" parent="Fog" unique_id=10121049]
transform = Transform3D(-42.075005, 7.553328e-06, 1.7196172e-13, 0, -3.7766642e-06, 45, 3.6783138e-06, 86.4, 1.9670128e-06, 59.320038, 14, 0)
mesh = SubResource("QuadMesh_yn8v8")
surface_material_override/0 = SubResource("ShaderMaterial_sxgg7")
