added night sky and moon

This commit is contained in:
Derek
2025-03-21 23:09:34 -05:00
parent b85014c48b
commit 7df45fd0e0
6 changed files with 56 additions and 36 deletions

View File

@@ -1,6 +1,7 @@
[gd_scene load_steps=8 format=3 uid="uid://cwy8iv8nlwqrc"]
[gd_scene load_steps=9 format=3 uid="uid://cwy8iv8nlwqrc"]
[ext_resource type="Script" uid="uid://dl780dimuvcms" path="res://scripts/realtime_day_night_cycle.gd" id="1_idjmm"]
[ext_resource type="Texture2D" uid="uid://do0nm3sn75gc3" path="res://assets/dikhololo_night_4k.exr" id="2_xp6wm"]
[sub_resource type="Gradient" id="Gradient_idjmm"]
offsets = PackedFloat32Array(0.00636943, 0.159236, 0.828025, 1)
@@ -16,7 +17,10 @@ _data = [Vector2(5, 0), 0.0, 0.66, 0, 0, Vector2(12, 2), 0.0, 0.0, 0, 0, Vector2
point_count = 3
[sub_resource type="PhysicalSkyMaterial" id="PhysicalSkyMaterial_xp6wm"]
rayleigh_coefficient = 17.2
rayleigh_color = Color(0.705144, 0.689027, 0.62083, 1)
energy_multiplier = 5.0
night_sky = ExtResource("2_xp6wm")
[sub_resource type="Sky" id="Sky_6g0ku"]
sky_material = SubResource("PhysicalSkyMaterial_xp6wm")
@@ -42,6 +46,10 @@ sun_energy_over_time = SubResource("Curve_idjmm")
environment = SubResource("Environment_ml2st")
[node name="Sun" type="DirectionalLight3D" parent="."]
transform = Transform3D(0.997171, 0.0751772, 0, 0.0642699, -0.852493, 0.518773, 0.0389999, -0.517306, -0.854912, 0, 0, 0)
light_energy = 1.45936
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)
shadow_enabled = true
[node name="Moon" type="DirectionalLight3D" parent="Sun"]
transform = Transform3D(1, 0, 0, 0, -1, -8.74228e-08, 0, 8.74228e-08, -1, 0, 0, 0)
light_color = Color(0.5874, 0.804263, 0.89, 1)
shadow_enabled = true