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

[ext_resource type="PackedScene" uid="uid://cmuvmmp7xam4o" path="res://core/daynight/environment_management.tscn" id="1_daynt"]
[ext_resource type="AudioStream" uid="uid://bfn6kxtpb8b7a" path="res://core/daynight/sound/thunder_1.mp3" id="2_l6e82"]
[ext_resource type="AudioStream" uid="uid://br2ye0dto487h" path="res://core/daynight/sound/thunder_2.mp3" id="3_28c1g"]
[ext_resource type="Shader" uid="uid://bneoex8xpmcm8" path="res://core/daynight/sky.gdshader" id="3_jiovi"]
[ext_resource type="Texture2D" uid="uid://dest0qa7vaid0" path="res://core/daynight/stars_albedo.png" id="4_abyor"]
[ext_resource type="AudioStream" uid="uid://dvabvoqyya0g5" path="res://core/daynight/sound/thunder_3.mp3" id="4_d5ghv"]
[ext_resource type="AudioStream" uid="uid://creenugno7hm" path="res://core/daynight/sound/thunder_4.mp3" id="5_g8vyu"]
[ext_resource type="Script" uid="uid://brcimd12tx3dm" path="res://core/daynight/edge_detection_compositor.gd" id="5_jgh18"]
[ext_resource type="AudioStream" uid="uid://bm6dq4jwsbxf6" path="res://core/daynight/sound/thunder_5.mp3" id="6_iu8wf"]
[ext_resource type="Script" uid="uid://cx2tlvxhvatj5" path="res://docs/museums/daynight/control.gd" id="6_q52t1"]
[ext_resource type="Script" uid="uid://ccdd52apoh4ir" path="res://docs/museums/daynight/camera_3d.gd" id="7_p2t1d"]
[ext_resource type="PackedScene" uid="uid://jj15telqu3rp" path="res://docs/museums/daynight/scenes/grass_test/grass_test.tscn" id="7_pd1r3"]
[ext_resource type="PackedScene" uid="uid://bonjxfjcdnntt" path="res://docs/museums/daynight/scenes/grain_test/grain_test.tscn" id="7_w3se4"]
[ext_resource type="PackedScene" uid="uid://cahsl77384kf1" path="res://docs/museums/daynight/scenes/chunk_c_f_1/house_muraglione.tscn" id="9_pd1r3"]

[sub_resource type="FastNoiseLite" id="FastNoiseLite_jiovi"]
fractal_lacunarity = 1.915
fractal_gain = 0.53
fractal_weighted_strength = 0.35

[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_abyor"]
noise = SubResource("FastNoiseLite_jiovi")
seamless = true

[sub_resource type="ShaderMaterial" id="ShaderMaterial_abyor"]
shader = ExtResource("3_jiovi")
shader_parameter/sky_top_color = Color(0.36438444, 0.6417803, 0.8712311, 1)
shader_parameter/sky_horizon_color = Color(0.75821966, 0.8417803, 0.92534095, 1)
shader_parameter/night_intensity = 0.0
shader_parameter/cloud_noise = SubResource("NoiseTexture2D_abyor")
shader_parameter/sun_color = Color(1, 0.88767046, 0.775341, 1)
shader_parameter/cloud_center_color = Color(1, 1, 1, 1)
shader_parameter/cloud_edge_color = Color(0.8, 0.85, 0.9, 1)
shader_parameter/cloud_direction = Vector2(0.5, 0.2)
shader_parameter/cloud_speed = 0.1
shader_parameter/cloud_scale = 0.5
shader_parameter/cloud_threshold = 0.5
shader_parameter/cloud_edge_thickness = 0.406000019285
shader_parameter/cloud_edge_softness = 0.0
shader_parameter/star_density = 1500.0
shader_parameter/star_rarity = 2500.0
shader_parameter/star_scale_variation = 0.5
shader_parameter/shooting_star_texture = ExtResource("4_abyor")
shader_parameter/shooting_star_color = Color(0.38431373, 0.61960787, 0.23137255, 1)
shader_parameter/shooting_star_density = 1.0
shader_parameter/shooting_star_speed = 1.0
shader_parameter/shooting_star_scale = 5.0
shader_parameter/shooting_star_lifetime = 0.5
shader_parameter/shooting_star_travel_dist = 15.0

[sub_resource type="Sky" id="Sky_50i22"]
sky_material = SubResource("ShaderMaterial_abyor")

[sub_resource type="Environment" id="Environment_icuhg"]
background_mode = 2
sky = SubResource("Sky_50i22")
ambient_light_color = Color(1, 0.88767046, 0.775341, 1)
tonemap_exposure = 0.9979451
ssao_enabled = true
ssao_radius = 0.5
ssao_intensity = 14.0
ssao_detail = 0.0
ssil_enabled = true
glow_enabled = true
glow_levels/4 = 1.0
glow_intensity = 1.1835606
glow_strength = 0.65
glow_bloom = 1.0
fog_enabled = true
fog_mode = 1
fog_light_color = Color(0.75821966, 0.8417803, 0.92534095, 1)
fog_density = 0.004876705
fog_sky_affect = 0.0

[sub_resource type="CompositorEffect" id="CompositorEffect_q52t1"]
resource_local_to_scene = false
resource_name = ""
enabled = true
effect_callback_type = 1
access_resolved_color = false
access_resolved_depth = false
needs_motion_vectors = false
needs_normal_roughness = false
script = ExtResource("5_jgh18")
metadata/_custom_type_script = "uid://brcimd12tx3dm"

[sub_resource type="Compositor" id="Compositor_jbfcc"]
compositor_effects = Array[CompositorEffect]([SubResource("CompositorEffect_q52t1")])

[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_p2t1d"]
albedo_color = Color(0.135, 0.45, 0.18224995, 1)

[sub_resource type="BoxMesh" id="BoxMesh_p2t1d"]
size = Vector3(200, 0.08, 200)

[node name="Museum" type="Node3D" unique_id=1411616506]

[node name="DayNight" parent="." unique_id=1578787116 node_paths=PackedStringArray("camera") instance=ExtResource("1_daynt")]
camera = NodePath("../Camera3D")
thunder_sounds = Array[AudioStream]([ExtResource("2_l6e82"), ExtResource("3_28c1g"), ExtResource("4_d5ghv"), ExtResource("5_g8vyu"), ExtResource("6_iu8wf")])

[node name="WorldEnvironment" type="WorldEnvironment" parent="." unique_id=6398994]
environment = SubResource("Environment_icuhg")
compositor = SubResource("Compositor_jbfcc")

[node name="DirectionalLight3D" type="DirectionalLight3D" parent="." unique_id=565189502]
transform = Transform3D(0.7246343, -0.20683524, 0.65736127, 0, 0.95389545, 0.30013812, -0.6891333, -0.21749045, 0.6912255, 0, 0, 0)
light_color = Color(1, 0.88767046, 0.775341, 1)
light_indirect_energy = 0.0
light_volumetric_fog_energy = 0.0
shadow_enabled = true
shadow_bias = 0.2
shadow_normal_bias = 0.0
shadow_opacity = 0.97
shadow_blur = 0.4
directional_shadow_mode = 0
directional_shadow_fade_start = 0.9

[node name="Camera3D" type="Camera3D" parent="." unique_id=1893906598]
transform = Transform3D(1, 0, 0, 0, 0.99452555, -0.10449375, 0, 0.10449375, 0.99452555, 0.48949432, 25.39013, 0)
script = ExtResource("7_p2t1d")

[node name="Terrain" type="MeshInstance3D" parent="." unique_id=1335123628]
material_override = SubResource("StandardMaterial3D_p2t1d")
mesh = SubResource("BoxMesh_p2t1d")

[node name="Control" type="Control" parent="." unique_id=1032167802]
layout_mode = 3
anchors_preset = 0
offset_right = 40.0
offset_bottom = 40.0
script = ExtResource("6_q52t1")

[node name="Snow" type="CheckButton" parent="Control" unique_id=1267493556]
layout_mode = 0
offset_left = 21.0
offset_top = 13.0
offset_right = 109.0
offset_bottom = 44.0
theme_override_colors/font_color = Color(0, 0, 0, 1)
theme_override_colors/font_focus_color = Color(0, 0, 0, 1)
theme_override_colors/font_pressed_color = Color(0, 0, 0, 1)
theme_override_colors/font_hover_color = Color(0, 0, 0, 1)
theme_override_colors/font_hover_pressed_color = Color(0, 0, 0, 1)
text = "Snow"

[node name="Rain" type="CheckButton" parent="Control" unique_id=1387886007]
layout_mode = 0
offset_left = 21.0
offset_top = 41.0
offset_right = 109.0
offset_bottom = 72.0
theme_override_colors/font_color = Color(0, 0, 0, 1)
theme_override_colors/font_focus_color = Color(0, 0, 0, 1)
theme_override_colors/font_pressed_color = Color(0, 0, 0, 1)
theme_override_colors/font_hover_color = Color(0, 0, 0, 1)
theme_override_colors/font_hover_pressed_color = Color(0, 0, 0, 1)
text = "Rain"

[node name="Wind" type="CheckButton" parent="Control" unique_id=1160113828]
layout_mode = 0
offset_left = 21.0
offset_top = 91.0
offset_right = 109.0
offset_bottom = 122.0
theme_override_colors/font_color = Color(0, 0, 0, 1)
theme_override_colors/font_focus_color = Color(0, 0, 0, 1)
theme_override_colors/font_pressed_color = Color(0, 0, 0, 1)
theme_override_colors/font_hover_color = Color(0, 0, 0, 1)
theme_override_colors/font_hover_pressed_color = Color(0, 0, 0, 1)
text = "Wind"

[node name="Fireflies" type="CheckButton" parent="Control" unique_id=1177089839]
layout_mode = 0
offset_left = 21.0
offset_top = 115.0
offset_right = 130.0
offset_bottom = 146.0
theme_override_colors/font_color = Color(0, 0, 0, 1)
theme_override_colors/font_focus_color = Color(0, 0, 0, 1)
theme_override_colors/font_pressed_color = Color(0, 0, 0, 1)
theme_override_colors/font_hover_color = Color(0, 0, 0, 1)
theme_override_colors/font_hover_pressed_color = Color(0, 0, 0, 1)
text = "Fireflies"

[node name="Storm" type="CheckButton" parent="Control" unique_id=936960924]
layout_mode = 0
offset_left = 21.0
offset_top = 66.0
offset_right = 117.0
offset_bottom = 97.0
theme_override_colors/font_color = Color(0, 0, 0, 1)
theme_override_colors/font_focus_color = Color(0, 0, 0, 1)
theme_override_colors/font_pressed_color = Color(0, 0, 0, 1)
theme_override_colors/font_hover_color = Color(0, 0, 0, 1)
theme_override_colors/font_hover_pressed_color = Color(0, 0, 0, 1)
text = "Storm"

[node name="DayTimeLabel" type="Label" parent="Control" unique_id=1673596218]
layout_mode = 0
offset_left = 26.0
offset_top = 150.0
offset_right = 135.0
offset_bottom = 173.0
theme_override_colors/font_color = Color(0, 0, 0, 1)
text = "Day Time"

[node name="DayTimeSlider" type="HSlider" parent="Control" unique_id=530788076]
layout_mode = 0
offset_left = 26.0
offset_top = 174.0
offset_right = 205.0
offset_bottom = 190.0
max_value = 1.0
step = 0.01

[node name="Dust" type="CheckButton" parent="Control" unique_id=2023312048]
layout_mode = 0
offset_left = 21.0
offset_top = 250.0
offset_right = 150.0
offset_bottom = 281.0
theme_override_colors/font_color = Color(0, 0, 0, 1)
theme_override_colors/font_focus_color = Color(0, 0, 0, 1)
theme_override_colors/font_pressed_color = Color(0, 0, 0, 1)
theme_override_colors/font_hover_color = Color(0, 0, 0, 1)
theme_override_colors/font_hover_pressed_color = Color(0, 0, 0, 1)
button_pressed = true
text = "Dust"

[node name="Blur" type="CheckButton" parent="Control" unique_id=1758807681]
layout_mode = 0
offset_left = 21.0
offset_top = 278.0
offset_right = 150.0
offset_bottom = 309.0
theme_override_colors/font_color = Color(0, 0, 0, 1)
theme_override_colors/font_focus_color = Color(0, 0, 0, 1)
theme_override_colors/font_pressed_color = Color(0, 0, 0, 1)
theme_override_colors/font_hover_color = Color(0, 0, 0, 1)
theme_override_colors/font_hover_pressed_color = Color(0, 0, 0, 1)
button_pressed = true
text = "Blur"

[node name="Pause" type="CheckButton" parent="Control" unique_id=156986934]
layout_mode = 0
offset_left = 21.0
offset_top = 189.0
offset_right = 158.0
offset_bottom = 220.0
theme_override_colors/font_color = Color(0, 0, 0, 1)
theme_override_colors/font_focus_color = Color(0, 0, 0, 1)
theme_override_colors/font_pressed_color = Color(0, 0, 0, 1)
theme_override_colors/font_hover_color = Color(0, 0, 0, 1)
theme_override_colors/font_hover_pressed_color = Color(0, 0, 0, 1)
text = "Pause Time"

[node name="Shadows" type="CheckButton" parent="Control" unique_id=1751516495]
layout_mode = 0
offset_left = 21.0
offset_top = 302.0
offset_right = 150.0
offset_bottom = 333.0
theme_override_colors/font_color = Color(0, 0, 0, 1)
theme_override_colors/font_focus_color = Color(0, 0, 0, 1)
theme_override_colors/font_pressed_color = Color(0, 0, 0, 1)
theme_override_colors/font_hover_color = Color(0, 0, 0, 1)
theme_override_colors/font_hover_pressed_color = Color(0, 0, 0, 1)
button_pressed = true
text = "Shadows"

[node name="Scene" type="Node" parent="." unique_id=701973010]

[node name="Grass" parent="Scene" unique_id=838519336 instance=ExtResource("7_pd1r3")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, -14)

[node name="Grain" parent="Scene" unique_id=1171350762 instance=ExtResource("7_w3se4")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)

[node name="House_Muraglione" parent="Scene" unique_id=1060427946 instance=ExtResource("9_pd1r3")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.41167784, 0)

[connection signal="toggled" from="Control/Snow" to="Control" method="_on_snow_toggled"]
[connection signal="toggled" from="Control/Rain" to="Control" method="_on_rain_toggled"]
[connection signal="toggled" from="Control/Wind" to="Control" method="_on_wind_toggled"]
[connection signal="toggled" from="Control/Fireflies" to="Control" method="_on_fireflies_toggled"]
[connection signal="toggled" from="Control/Storm" to="Control" method="_on_storm_toggled"]
[connection signal="value_changed" from="Control/DayTimeSlider" to="Control" method="_on_day_time_slider_value_changed"]
[connection signal="toggled" from="Control/Dust" to="Control" method="_on_dust_toggled"]
[connection signal="toggled" from="Control/Blur" to="Control" method="_on_blur_toggled"]
[connection signal="toggled" from="Control/Pause" to="Control" method="_on_pause_toggled"]
[connection signal="toggled" from="Control/Shadows" to="Control" method="_on_shadows_toggled"]
