lighting improvements

This commit is contained in:
betalars 2024-02-10 13:35:04 +01:00
parent afb3f241c4
commit 7423461464
4 changed files with 25 additions and 16 deletions

View File

@ -48,6 +48,6 @@ void sky() {
); );
//COLOR += pow(texture(nebula_gradient, vec2(texture(universe_background, SKY_COORDS).z + nebula_offset * texture(universe_background, -SKY_COORDS + TIME * vec2(0.0005, 0) + moving_noise).z + 0.1)).xyz, vec3(2.0)); //COLOR += pow(texture(nebula_gradient, vec2(texture(universe_background, SKY_COORDS).z + nebula_offset * texture(universe_background, -SKY_COORDS + TIME * vec2(0.0005, 0) + moving_noise).z + 0.1)).xyz, vec3(2.0));
COLOR = COLOR * (1.0-nebula.q) + nebula.xyz + stars; COLOR = (COLOR * (1.0-nebula.q) + nebula.xyz + stars * SKY_COORDS.y)*float(SKY_COORDS.y<0.5);
//COLOR = texture(universe_background, SKY_COORDS).zzz; //COLOR = texture(universe_background, SKY_COORDS).zzz;
} }

View File

@ -2,7 +2,6 @@
[resource] [resource]
resource_name = "door" resource_name = "door"
cull_mode = 2
vertex_color_use_as_albedo = true vertex_color_use_as_albedo = true
albedo_color = Color(0.882082, 0.839278, 0.809231, 1) albedo_color = Color(0.882082, 0.839278, 0.809231, 1)
roughness = 0.5 roughness = 0.5

View File

@ -1,4 +1,4 @@
[gd_scene load_steps=125 format=3 uid="uid://b3b0gyvklqn50"] [gd_scene load_steps=126 format=3 uid="uid://b3b0gyvklqn50"]
[ext_resource type="Script" path="res://base-environments/youth_room/room_handle.gd" id="1_aitp0"] [ext_resource type="Script" path="res://base-environments/youth_room/room_handle.gd" id="1_aitp0"]
[ext_resource type="PackedScene" uid="uid://c0i4ydmxtxfho" path="res://base-environments/youth_room/import/youth_room.glb" id="1_jf3oi"] [ext_resource type="PackedScene" uid="uid://c0i4ydmxtxfho" path="res://base-environments/youth_room/import/youth_room.glb" id="1_jf3oi"]
@ -37,6 +37,7 @@
[ext_resource type="Material" uid="uid://bmu72cnsr8c5e" path="res://base-environments/youth_room/shaders/window.material" id="32_pwbgf"] [ext_resource type="Material" uid="uid://bmu72cnsr8c5e" path="res://base-environments/youth_room/shaders/window.material" id="32_pwbgf"]
[ext_resource type="ArrayMesh" uid="uid://jjrvf8px2ut3" path="res://base-environments/youth_room/shaders/winfow_frames.res" id="32_w6oa5"] [ext_resource type="ArrayMesh" uid="uid://jjrvf8px2ut3" path="res://base-environments/youth_room/shaders/winfow_frames.res" id="32_w6oa5"]
[ext_resource type="Texture2D" uid="uid://dabnlcnuticww" path="res://base-environments/intro_scene/textures/sky_textures_2.png" id="33_mvrs2"] [ext_resource type="Texture2D" uid="uid://dabnlcnuticww" path="res://base-environments/intro_scene/textures/sky_textures_2.png" id="33_mvrs2"]
[ext_resource type="PackedScene" uid="uid://cg70r0102t8nl" path="res://base-environments/youth_room/fairylights.tscn" id="39_q6rov"]
[sub_resource type="BoxShape3D" id="BoxShape3D_j3mqx"] [sub_resource type="BoxShape3D" id="BoxShape3D_j3mqx"]
size = Vector3(0.711297, 2.53136, 1.74815) size = Vector3(0.711297, 2.53136, 1.74815)
@ -2626,7 +2627,7 @@ layout_mode = 2
size_flags_horizontal = 4 size_flags_horizontal = 4
size_flags_vertical = 4 size_flags_vertical = 4
mouse_filter = 2 mouse_filter = 2
scroll_vertical = 315 scroll_vertical = 638
horizontal_scroll_mode = 0 horizontal_scroll_mode = 0
vertical_scroll_mode = 3 vertical_scroll_mode = 3
@ -2759,6 +2760,7 @@ layout_mode = 2
size_flags_horizontal = 4 size_flags_horizontal = 4
size_flags_vertical = 4 size_flags_vertical = 4
mouse_filter = 0 mouse_filter = 0
scroll_vertical = 30
horizontal_scroll_mode = 0 horizontal_scroll_mode = 0
vertical_scroll_mode = 3 vertical_scroll_mode = 3
@ -3100,15 +3102,17 @@ light_energy = 0.5
omni_range = 0.147682 omni_range = 0.147682
[node name="OmniLight3D2" type="OmniLight3D" parent="visuals/lights"] [node name="OmniLight3D2" type="OmniLight3D" parent="visuals/lights"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.57389, 0.689055, -0.718959) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.77406, 0.63822, -0.383553)
light_color = Color(0.894118, 0.87451, 0.686275, 1) light_color = Color(0.894118, 0.87451, 0.686275, 1)
light_size = 0.1 light_size = 0.2
light_specular = 0.1
shadow_enabled = true shadow_enabled = true
omni_range = 2.17653 omni_range = 2.77016
omni_attenuation = 0.450626 omni_attenuation = 0.450626
[node name="OmniLight3D3" type="OmniLight3D" parent="visuals/lights"] [node name="OmniLight3D3" type="OmniLight3D" parent="visuals/lights"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 3.71696, 0.649284, 0.541634) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 3.71696, 0.532118, 0.541634)
visible = false
light_color = Color(0.929412, 0.866667, 0.639216, 1) light_color = Color(0.929412, 0.866667, 0.639216, 1)
light_energy = 0.3 light_energy = 0.3
light_size = 0.1 light_size = 0.1
@ -3117,10 +3121,12 @@ omni_range = 2.17653
omni_attenuation = 0.450626 omni_attenuation = 0.450626
[node name="OmniLight3D4" type="OmniLight3D" parent="visuals/lights"] [node name="OmniLight3D4" type="OmniLight3D" parent="visuals/lights"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.55029, 1.48654, -0.513123) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.47143, 1.6968, -0.554695)
layers = 32769
light_color = Color(0.894118, 0.87451, 0.686275, 1) light_color = Color(0.894118, 0.87451, 0.686275, 1)
light_energy = 0.1 light_energy = 0.1
light_size = 0.05 light_size = 0.3
light_specular = 0.0
shadow_enabled = true shadow_enabled = true
omni_range = 2.17653 omni_range = 2.17653
omni_attenuation = 1.41421 omni_attenuation = 1.41421
@ -3135,10 +3141,11 @@ script = SubResource("GDScript_5ot1o")
[node name="lighting aids" type="Node3D" parent="visuals"] [node name="lighting aids" type="Node3D" parent="visuals"]
[node name="window_probe" type="ReflectionProbe" parent="visuals/lighting aids"] [node name="window_probe" type="ReflectionProbe" parent="visuals/lighting aids"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.01338, 0.972332, 2.73763) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.01338, 0.972332, 2.93068)
max_distance = 7.0 max_distance = 7.0
size = Vector3(1.55939, 2.08125, 0.431185) size = Vector3(1.55939, 2.08125, 0.817277)
origin_offset = Vector3(0, 0.46875, 0.117676) origin_offset = Vector3(0.0200195, 0.707031, 0.205592)
box_projection = true
enable_shadows = true enable_shadows = true
cull_mask = 1 cull_mask = 1
mesh_lod_threshold = 0.0 mesh_lod_threshold = 0.0
@ -3160,10 +3167,9 @@ box_projection = true
enable_shadows = true enable_shadows = true
[node name="upper_bunkbed_probe" type="ReflectionProbe" parent="visuals/lighting aids"] [node name="upper_bunkbed_probe" type="ReflectionProbe" parent="visuals/lighting aids"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.89428, 1.75054, -0.0384804) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 3.14632, 1.55788, -0.232231)
max_distance = 5.0 max_distance = 5.0
size = Vector3(2.39921, 1.61006, 2.62172) size = Vector3(1.81269, 1.61006, 2.62172)
origin_offset = Vector3(-0.456543, -0.353516, -0.0356445)
box_projection = true box_projection = true
interior = true interior = true
enable_shadows = true enable_shadows = true
@ -3271,6 +3277,10 @@ light_specular = 0.0
omni_range = 0.457129 omni_range = 0.457129
omni_attenuation = 0.659754 omni_attenuation = 0.659754
[node name="fairylights" parent="." instance=ExtResource("39_q6rov")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.89212, 5.96046e-08, -0.143107)
light_array = Array[Vector3]([Vector3(-0.545, 0.915, 1.035), Vector3(-0.47, 0.855, 0.905), Vector3(-0.44, 0.871, 0.78), Vector3(-0.385, 0.91, 0.69), Vector3(-0.38, 0.995, 0.595), Vector3(-0.39, 0.925, 0.465), Vector3(-0.364, 0.86, 0.211), Vector3(-0.295, 0.82, 0.06), Vector3(-0.255, 0.805, -0.15), Vector3(-0.175, 0.83, -0.355), Vector3(-0.135, 0.955, -0.515), Vector3(-0.025, 0.78, -0.615), Vector3(0.115, 0.63, -0.695), Vector3(0.245, 0.555, -0.745), Vector3(0.37, 0.595, -0.805), Vector3(0.455, 0.745, -0.84), Vector3(0.505, 0.89, -0.87), Vector3(0.445, 1.175, -0.87), Vector3(0.26, 1.28, -0.815), Vector3(0.125, 1.35, -0.8), Vector3(-0.037, 1.479, -0.834), Vector3(-0.2, 1.601, -0.851), Vector3(-0.359, 1.769, -0.85), Vector3(-0.5, 1.949, -0.85), Vector3(-0.594, 2.126, -0.85), Vector3(-0.634, 2.238, -0.85), Vector3(-0.634, 2.035, -0.85), Vector3(-0.614, 1.875, -0.85), Vector3(-0.65, 1.655, -0.85), Vector3(-0.65, 1.475, -0.87)])
[connection signal="ini_room" from="." to="logic/PlayerController" method="_on_ini_room"] [connection signal="ini_room" from="." to="logic/PlayerController" method="_on_ini_room"]
[connection signal="ini_room" from="." to="logic/ScenePlayer" method="_on_ini_room"] [connection signal="ini_room" from="." to="logic/ScenePlayer" method="_on_ini_room"]
[connection signal="ini_room" from="." to="visuals/lights/light_animation" method="_on_ini_room"] [connection signal="ini_room" from="." to="visuals/lights/light_animation" method="_on_ini_room"]