[gd_scene load_steps=38 format=3 uid="uid://dorvgphrel13u"]

[ext_resource type="PackedScene" uid="uid://bw42mox3u02yq" path="res://_scenes/main_character.tscn" id="1_ciup7"]
[ext_resource type="Material" uid="uid://wq3811s3nwm7" path="res://materials/sky.tres" id="1_f50i4"]
[ext_resource type="Script" uid="uid://dav7mfvtja61m" path="res://_script/terrain/TerrainManager.cs" id="2_hui18"]
[ext_resource type="Script" uid="uid://cau6dgr4td5dk" path="res://_script/EnvironmentManager.cs" id="2_luoph"]
[ext_resource type="Texture2D" uid="uid://dvprrws80mh2u" path="res://materials/start.png" id="3_ike5v"]
[ext_resource type="Script" uid="uid://tk8lkgbaluti" path="res://_script/terrain/TerrainDetailsManager.cs" id="3_x21qi"]
[ext_resource type="Script" uid="uid://h5w4bya8uxkc" path="res://_script/MobManager.cs" id="6_5h46a"]
[ext_resource type="Material" uid="uid://knjtxqt2cr3q" path="res://materials/terrain_vertex_test.tres" id="6_hvdyj"]
[ext_resource type="Shader" uid="uid://b0la2we3pp8s7" path="res://materials/shaders/vertex_color.gdshader" id="7_osuqp"]
[ext_resource type="Shader" uid="uid://dref6kokf3xgt" path="res://materials/shaders/planar_projector.gdshader" id="9_u8evv"]

[sub_resource type="Gradient" id="Gradient_hvdyj"]
offsets = PackedFloat32Array(0, 0.358396, 1)
colors = PackedColorArray(0.377919, 0.377919, 0.377919, 1, 0.321728, 0.321728, 0.321728, 1, 0.147672, 0.147672, 0.147672, 1)

[sub_resource type="FastNoiseLite" id="FastNoiseLite_luoph"]

[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_ike5v"]
noise = SubResource("FastNoiseLite_luoph")
color_ramp = SubResource("Gradient_hvdyj")

[sub_resource type="Sky" id="Sky_hvdyj"]
sky_material = ExtResource("1_f50i4")
radiance_size = 2

[sub_resource type="Environment" id="Environment_673ij"]
background_mode = 2
sky = SubResource("Sky_hvdyj")
ambient_light_source = 3
ambient_light_color = Color(0.811046, 0.567566, 0.672959, 1)
reflected_light_source = 2
tonemap_mode = 2
sdfgi_use_occlusion = true
sdfgi_bounce_feedback = 0.3
glow_enabled = true
glow_levels/1 = 0.28
glow_normalized = true
glow_intensity = 1.26
glow_strength = 1.22
glow_bloom = 0.03
glow_blend_mode = 1
glow_map_strength = 1.0
glow_map = SubResource("NoiseTexture2D_ike5v")
fog_enabled = true
fog_light_color = Color(0.3322283, 0.5361908, 0.91814333, 1)
fog_light_energy = 0.89
fog_sun_scatter = 0.41
fog_density = 0.005
fog_aerial_perspective = 0.779
volumetric_fog_density = 0.0119
adjustment_enabled = true

[sub_resource type="Gradient" id="Gradient_t248a"]
offsets = PackedFloat32Array(0.21132898, 0.48737863)
colors = PackedColorArray(0, 0, 0, 1, 0.9340804, 0.9340805, 0.93408036, 1)

[sub_resource type="Gradient" id="Gradient_osuqp"]
offsets = PackedFloat32Array(0, 0.41165048, 1)
colors = PackedColorArray(0, 0, 0, 1, 0.35336536, 0.35336536, 0.35336536, 1, 0.8217887, 0.82178867, 0.82178867, 1)

[sub_resource type="Gradient" id="Gradient_lq8db"]
offsets = PackedFloat32Array(0.036893204, 1)
colors = PackedColorArray(0.6872149, 0.68721503, 0.6872149, 1, 0.427493, 0.42749307, 0.42749307, 1)

[sub_resource type="Gradient" id="Gradient_iwksa"]
colors = PackedColorArray(1, 1, 1, 1, 1, 1, 1, 1)

[sub_resource type="PhysicsMaterial" id="PhysicsMaterial_23t8k"]

[sub_resource type="BoxShape3D" id="BoxShape3D_8idyo"]
size = Vector3(2, 0.1, 2)

[sub_resource type="PlaneMesh" id="PlaneMesh_virbw"]

[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_hvdyj"]
albedo_texture = ExtResource("3_ike5v")
roughness_texture = ExtResource("3_ike5v")

[sub_resource type="ShaderMaterial" id="ShaderMaterial_lq8db"]
render_priority = 0
shader = ExtResource("7_osuqp")

[sub_resource type="CapsuleMesh" id="CapsuleMesh_luoph"]
lightmap_size_hint = Vector2i(235, 118)
flip_faces = true
uv2_padding = 1.91
radius = 7.443
height = 14.886

[sub_resource type="FastNoiseLite" id="FastNoiseLite_ike5v"]

[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_hvdyj"]
width = 56
height = 56
noise = SubResource("FastNoiseLite_ike5v")

[sub_resource type="ShaderMaterial" id="ShaderMaterial_ike5v"]
render_priority = 0
shader = ExtResource("9_u8evv")
shader_parameter/distortion_texture_x = SubResource("NoiseTexture2D_hvdyj")
shader_parameter/distortion_texture_y = SubResource("NoiseTexture2D_hvdyj")
shader_parameter/color1 = Color(0.96862745, 0.5058824, 0.5411765, 0.5254902)
shader_parameter/color2 = Color(2.2633145, 0, 1.7290316, 0.08235294)
shader_parameter/threshold = 0.2
shader_parameter/fresnel_sharpness = 2.89
shader_parameter/distortion_strength = 1.035
shader_parameter/distortion_speed = 0.015
shader_parameter/distortion_scale = 1.02

[sub_resource type="QuadMesh" id="QuadMesh_ike5v"]
size = Vector2(4000, 4000)

[sub_resource type="Gradient" id="Gradient_b8xby"]
offsets = PackedFloat32Array(0.06315789, 0.13894737)
colors = PackedColorArray(0, 0, 0, 0, 0.17063385, 0.48117667, 0.9037617, 1)

[sub_resource type="GradientTexture2D" id="GradientTexture2D_nd5cu"]
gradient = SubResource("Gradient_b8xby")
fill = 1
fill_from = Vector2(0.5, 0.4957265)
fill_to = Vector2(0.8162393, 0.21367522)

[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_11ryp"]
transparency = 1
albedo_color = Color(0.7236453, 0.7884173, 0.9670699, 1)
albedo_texture = SubResource("GradientTexture2D_nd5cu")
metallic = 0.97
metallic_specular = 0.37
roughness = 0.32
rim_enabled = true
rim = 0.42
rim_tint = 0.56

[sub_resource type="Gradient" id="Gradient_ike5v"]
interpolation_mode = 2
offsets = PackedFloat32Array(0, 0.15240084, 0.6388309, 1)
colors = PackedColorArray(0.17254902, 0.48235294, 0.9019608, 0, 0.17704809, 0.49492985, 0.92547864, 1.0260742, 0.17254902, 0.48235294, 0.9019608, 1, 0, 0, 0, 0)

[sub_resource type="GradientTexture2D" id="GradientTexture2D_hvdyj"]
gradient = SubResource("Gradient_ike5v")

[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_osuqp"]
transparency = 1
albedo_texture = SubResource("GradientTexture2D_hvdyj")

[sub_resource type="QuadMesh" id="QuadMesh_lq8db"]
material = SubResource("StandardMaterial3D_osuqp")
size = Vector2(300, 4000)

[sub_resource type="CylinderMesh" id="CylinderMesh_ike5v"]
cap_top = false
cap_bottom = false

[node name="World" type="Node3D"]

[node name="WorldEnvironment" type="WorldEnvironment" parent="." node_paths=PackedStringArray("SunLight")]
environment = SubResource("Environment_673ij")
script = ExtResource("2_luoph")
SunLight = NodePath("../DirectionalLight3D")
SpottyGradient = SubResource("Gradient_t248a")
CloudyGradient = SubResource("Gradient_osuqp")
CoveredGradient = SubResource("Gradient_lq8db")
SunnyGradient = SubResource("Gradient_iwksa")
AM_DaytimeSunTop = Color(0.35129276, 0.6127257, 0.7899416, 1)
AM_DaytimeSunGround = Color(0.82581145, 0.7179889, 0.6930066, 1)
AM_CloudColor = Color(0.7871082, 0.5357057, 0.64158916, 1)
AM_FogColor = Color(0.66401166, 0.2889742, 0.71187395, 1)
AM_DaytimeLightEnergy = 1.0
AM_TimeStart = 6.0
AM_TimeEnd = 9.0
NOON_DaytimeSunTop = Color(0.4240942, 0.7723892, 0.9697487, 1)
NOON_DaytimeSunGround = Color(0.55160356, 0.8566488, 0.9999996, 1)
NOON_DaytimeLightColor = Color(0.84851354, 0.736708, 0.58976215, 1)
NOON_CloudColor = Color(0.88767403, 0.80533785, 0.7916861, 1)
NOON_FogColor = Color(0.80875844, 0.4456138, 0.2049295, 1)
NOON_DaytimeLightEnergy = 1.2
NOON_TimeStart = 9.0
PM_DaytimeSunTop = Color(0.10378859, 0.5938163, 0.8829619, 1)
PM_DaytimeSunGround = Color(0.95321757, 0.68088466, 0.52256775, 1)
PM_DaytimeLightColor = Color(0.91562915, 0.7471837, 0.52453005, 1)
PM_CloudColor = Color(0.9035783, 0.61493015, 0.44281328, 1)
PM_FogColor = Color(0.90039825, 0.38819066, 0.38475606, 1)
PM_DaytimeLightEnergy = 1.5
AM_TransitionTimeToDusk = 1.5
EV_DaytimeSunTop = Color(0.40622988, 0.26584163, 0.61221397, 1)
EV_CloudColor = Color(0.46713996, 0.2688164, 0.2146742, 1)
EV_FogColor = Color(0.5196789, 0.44289675, 0.7717213, 1)
EV_DaytimeLightEnergy = 1.1
Night_Ground = Color(0.06360622, 0.07483224, 0.1428298, 1)
Night_LightColor = Color(0.18991342, 0.22371992, 0.26031756, 1)
Night_CloudColor = Color(0.09411765, 0.11764706, 0.07058824, 0.76862746)
Night_FogColor = Color(0.3351625, 0.3506044, 0.9430781, 1)
Night_LightEnergy = 0.05
CycleSpeed = 10.0
CloudsSpeed = 3.0

[node name="PlayingCharacter" parent="." node_paths=PackedStringArray("Faraway") instance=ExtResource("1_ciup7")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)
Faraway = NodePath("../Faraway")

[node name="StaticBody3D" type="StaticBody3D" parent="."]
transform = Transform3D(2.095, 0, 0, 0, 2.095, 0, 0, 0, 2.095, 0, 13.4573, 37.1025)
visible = false
physics_material_override = SubResource("PhysicsMaterial_23t8k")

[node name="CollisionShape3D" type="CollisionShape3D" parent="StaticBody3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.0523541, 0)
shape = SubResource("BoxShape3D_8idyo")

[node name="MeshInstance3D" type="MeshInstance3D" parent="StaticBody3D/CollisionShape3D"]
transform = Transform3D(-0.999848, 0, 0.0174174, 0, 1, 0, -0.0174174, 0, -0.999848, 0, 0.0523543, 0)
mesh = SubResource("PlaneMesh_virbw")
skeleton = NodePath("../../..")
surface_material_override/0 = SubResource("StandardMaterial3D_hvdyj")

[node name="TerrainManager" type="Node" parent="."]
script = ExtResource("2_hui18")
SaveTerrainToLocalDisk = false
UseDebugMaterial = false
TerrainMaterial = ExtResource("6_hvdyj")
DebugTerrainMaterial = SubResource("ShaderMaterial_lq8db")

[node name="TerrainDetailsManager" type="Node" parent="TerrainManager"]
script = ExtResource("3_x21qi")
SeaWaterScene = "res://_scenes/sea_water.tscn"

[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 0.88759, 0.460634, 0, -0.460634, 0.88759, 0, 4.00946, 4.97494)
light_color = Color(0.932094, 0.710711, 0.539878, 1)
light_energy = 2.964
light_indirect_energy = 1.267
light_volumetric_fog_energy = 1.266
light_angular_distance = 3.0
light_bake_mode = 0
shadow_enabled = true
shadow_bias = 0.043
shadow_normal_bias = 1.683
shadow_transmittance_bias = -7.837
shadow_opacity = 0.87
shadow_blur = 2.107
directional_shadow_blend_splits = true
directional_shadow_fade_start = 0.73

[node name="MobsManager" type="Node3D" parent="." node_paths=PackedStringArray("SafetyBubble")]
script = ExtResource("6_5h46a")
DelayBetweenSpawns = 2.0
SpawnsPerTime = 1
SafetyBubble = NodePath("SafetyBubble")

[node name="SafetyBubble" type="MeshInstance3D" parent="MobsManager"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.63792, -0.291809)
layers = 524288
cast_shadow = 0
gi_mode = 0
mesh = SubResource("CapsuleMesh_luoph")
skeleton = NodePath("../..")
surface_material_override/0 = SubResource("ShaderMaterial_ike5v")

[node name="Node3D" type="Node3D" parent="."]
transform = Transform3D(10, 0, 0, 0, 10, 0, 0, 0, 10, -18.8404, 0.0218635, 0)

[node name="Faraway" type="MeshInstance3D" parent="."]
transform = Transform3D(1, 0, 0, 0, -4.371139e-08, 1, 0, -1, -4.371139e-08, 0, 0, 0)
cast_shadow = 0
mesh = SubResource("QuadMesh_ike5v")
surface_material_override/0 = SubResource("StandardMaterial3D_11ryp")

[node name="MeshInstance3D" type="MeshInstance3D" parent="Faraway"]
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 2000, 0, 0)
mesh = SubResource("QuadMesh_lq8db")

[node name="MeshInstance3D5" type="MeshInstance3D" parent="Faraway"]
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 2000, 0, 45.954)
visible = false
mesh = SubResource("CylinderMesh_ike5v")

[node name="MeshInstance3D3" type="MeshInstance3D" parent="Faraway"]
transform = Transform3D(-4.371139e-08, -1, 4.371139e-08, 0, -4.371139e-08, -1, 1, -4.371139e-08, 1.9106855e-15, 0, 2000, 0)
mesh = SubResource("QuadMesh_lq8db")

[node name="MeshInstance3D4" type="MeshInstance3D" parent="Faraway"]
transform = Transform3D(1.3113416e-07, 1, -4.371139e-08, 3.821371e-15, 4.371139e-08, 1, 1, -1.3113416e-07, 1.9106855e-15, 0, -2000, 0)
mesh = SubResource("QuadMesh_lq8db")

[node name="MeshInstance3D2" type="MeshInstance3D" parent="Faraway"]
transform = Transform3D(4.371139e-08, -3.821371e-15, 1, -8.742278e-08, -1, 0, 1, -8.742278e-08, -4.371139e-08, -2000, 0, 0)
mesh = SubResource("QuadMesh_lq8db")
