fix sky
This commit is contained in:
@@ -322,6 +322,8 @@ shadow_proxy_system = NodePath("ShadowProxySystem")
|
||||
world_environment = NodePath("WorldEnvironment")
|
||||
sun_light = NodePath("SunLight")
|
||||
moon_light = NodePath("MoonLight")
|
||||
deterministic_seed = 5
|
||||
show_debug_panel = true
|
||||
|
||||
[node name="PresetLibrary" type="Node" parent="." unique_id=1947927418]
|
||||
script = ExtResource("2_preset_library")
|
||||
@@ -329,7 +331,7 @@ presets = Array[ExtResource("3_c6jpa")]([SubResource("Resource_ajt3x"), SubResou
|
||||
|
||||
[node name="DayNightController" type="Node" parent="." unique_id=1083149574]
|
||||
script = ExtResource("3_day_night")
|
||||
time_of_day = 0.1482273141975634
|
||||
time_of_day = 0.31124353179020736
|
||||
current_day = 4
|
||||
sun_color_curve = SubResource("Gradient_sxvon")
|
||||
sun_intensity_curve = SubResource("Curve_fm80q")
|
||||
@@ -351,11 +353,11 @@ script = ExtResource("5_clouds")
|
||||
layer_configs = Array[ExtResource("4_ssi15")]([SubResource("Resource_xh4oc"), SubResource("Resource_ahi10"), SubResource("Resource_a5xai"), SubResource("Resource_uxs4q")])
|
||||
global_coverage = 0.2
|
||||
global_wind_speed = 0.5
|
||||
sun_direction = Vector3(0.6647294, -0.6939493, -0.2767116)
|
||||
sun_color = Color(1, 0.55136895, 0.3513689, 1)
|
||||
sun_intensity = 0.0
|
||||
moon_direction = Vector3(0.6799649, 0.7098545, 0.18372385)
|
||||
moon_intensity = 0.33406785
|
||||
sun_direction = Vector3(0.9166991, 0.37115902, 0.14799932)
|
||||
sun_color = Color(1, 0.62245756, 0.45919484, 1)
|
||||
sun_intensity = 0.80182046
|
||||
moon_direction = Vector3(0.9225648, -0.37353396, -0.09667771)
|
||||
moon_intensity = 0.0
|
||||
|
||||
[node name="PostProcessController" type="Node" parent="." unique_id=186747041]
|
||||
script = ExtResource("6_post_process")
|
||||
@@ -365,9 +367,11 @@ sky_top_color = Color(0.2, 0.4, 0.85, 1)
|
||||
sky_horizon_color = Color(0.6, 0.75, 0.95, 1)
|
||||
sky_bottom_color = Color(0.5, 0.6, 0.7, 1)
|
||||
skybox_texture = ExtResource("6_ssi15")
|
||||
fog_color = Color(0.1, 0.12, 0.2, 1)
|
||||
fog_density = 0.017602645
|
||||
sun_direction = Vector3(0.6647294, -0.6939493, -0.2767116)
|
||||
fog_color = Color(0.24694908, 0.27429652, 0.35919484, 1)
|
||||
fog_density = 0.014247157
|
||||
sun_glow_intensity = 0.40091023
|
||||
sun_glow_color = Color(1, 0.62245756, 0.45919484, 1)
|
||||
sun_direction = Vector3(0.9166991, 0.37115902, 0.14799932)
|
||||
|
||||
[node name="VFXController" type="Node3D" parent="." unique_id=207251300]
|
||||
script = ExtResource("7_vfx")
|
||||
@@ -382,13 +386,13 @@ environment = ExtResource("13_2w5ig")
|
||||
compositor = SubResource("Compositor_ssi15")
|
||||
|
||||
[node name="SunLight" type="DirectionalLight3D" parent="." unique_id=1278065589]
|
||||
transform = Transform3D(-0.38430893, -0.9231061, 0.0134779755, 0, 0.014599117, 0.99989367, -0.9232045, 0.384268, -0.0056105736, 0, 50, 0)
|
||||
visible = false
|
||||
light_color = Color(1, 0.55136895, 0.3513689, 1)
|
||||
light_energy = 0.0
|
||||
transform = Transform3D(0.15938424, -0.98704875, 0.018195797, 0, 0.018431408, 0.99983037, -0.9872164, -0.15935718, 0.0029376775, 0, 50, 0)
|
||||
light_color = Color(1, 0.62245756, 0.45919484, 1)
|
||||
light_energy = 0.80182046
|
||||
shadow_enabled = true
|
||||
|
||||
[node name="MoonLight" type="DirectionalLight3D" parent="." unique_id=52072807]
|
||||
transform = Transform3D(0.2608423, -0.9652886, 0.013407094, 0, 0.013887873, 0.9999038, -0.9653814, -0.26081723, 0.003622545, 0, 50, 0)
|
||||
transform = Transform3D(-0.10422167, -0.99438065, 0.01858649, 0, 0.018688265, 0.9998256, -0.99455404, 0.1042035, -0.0019477225, 0, 50, 0)
|
||||
visible = false
|
||||
light_color = Color(0.7, 0.8, 1, 1)
|
||||
light_energy = 0.33406785
|
||||
light_energy = 0.0
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
[node name="DynamicSkyToy" type="Node3D" unique_id=1968105337]
|
||||
|
||||
[node name="DynamicSky" parent="." unique_id=516593260 instance=ExtResource("1_cuadp")]
|
||||
show_debug_panel = true
|
||||
|
||||
[node name="Camera3D" type="Camera3D" parent="." unique_id=805686804]
|
||||
|
||||
|
||||
@@ -110,16 +110,16 @@ shader_parameter/sky_bottom_color = Color(0.5, 0.6, 0.7, 1)
|
||||
shader_parameter/gradient_intensity = 1.0
|
||||
shader_parameter/horizon_blend = 0.5
|
||||
shader_parameter/sun_glow_enabled = true
|
||||
shader_parameter/sun_direction = Vector3(0.9079945, -0.38918287, -0.1551863)
|
||||
shader_parameter/sun_glow_color = Color(1, 0.5257787, 0.32577872, 1)
|
||||
shader_parameter/sun_glow_intensity = 0.0
|
||||
shader_parameter/sun_direction = Vector3(0.9166991, 0.37115902, 0.14799932)
|
||||
shader_parameter/sun_glow_color = Color(1, 0.62245756, 0.45919484, 1)
|
||||
shader_parameter/sun_glow_intensity = 0.40091023
|
||||
shader_parameter/sun_glow_size = 0.2
|
||||
shader_parameter/sun_glow_falloff = 2.0
|
||||
shader_parameter/dawn_dusk_enabled = true
|
||||
shader_parameter/dawn_dusk_color = Color(1, 0.6, 0.4, 1)
|
||||
shader_parameter/dawn_dusk_intensity = 0.5
|
||||
shader_parameter/dawn_dusk_blend = 0.0
|
||||
shader_parameter/stars_visibility = 0.80297995
|
||||
shader_parameter/stars_visibility = 0.0
|
||||
shader_parameter/stars_tint = Color(1, 1, 1, 1)
|
||||
|
||||
[sub_resource type="Sky" id="Sky_ssi15"]
|
||||
@@ -128,9 +128,9 @@ sky_material = SubResource("ShaderMaterial_jmmec")
|
||||
[resource]
|
||||
background_mode = 2
|
||||
sky = SubResource("Sky_ssi15")
|
||||
ambient_light_color = Color(0.15, 0.18, 0.3, 1)
|
||||
ambient_light_energy = 0.4504698
|
||||
ambient_light_color = Color(0.26021183, 0.2951101, 0.4102118, 1)
|
||||
ambient_light_energy = 0.5301137
|
||||
fog_enabled = true
|
||||
fog_light_color = Color(0.1, 0.12, 0.2, 1)
|
||||
fog_density = 0.015825503
|
||||
fog_light_color = Color(0.24694908, 0.27429652, 0.35919484, 1)
|
||||
fog_density = 0.014247157
|
||||
fog_height_density = 0.1
|
||||
|
||||
@@ -147,6 +147,9 @@ func _create_cloud_material(config: CloudLayerConfig) -> ShaderMaterial:
|
||||
|
||||
if config.texture:
|
||||
material.set_shader_parameter("cloud_texture", config.texture)
|
||||
else:
|
||||
var procedural_tex := ProceduralCloudTexture.create_default_cloud_texture(config.layer_type)
|
||||
material.set_shader_parameter("cloud_texture", procedural_tex)
|
||||
|
||||
return material
|
||||
|
||||
@@ -214,12 +217,13 @@ func _update_flow(delta: float) -> void:
|
||||
|
||||
var wind_dir := global_wind_direction if use_global_wind else config.flow_direction
|
||||
var wind_spd := global_wind_speed if use_global_wind else 1.0
|
||||
#var flow_offset: float = material.get_shader_parameter("flow_offset")
|
||||
#flow_offset += config.flow_speed * wind_spd * delta
|
||||
#
|
||||
#material.set_shader_parameter("flow_offset", flow_offset)
|
||||
#material.set_shader_parameter("flow_direction", wind_dir)
|
||||
#smaterial.set_shader_parameter("evolution_offset", _evolution_offset)
|
||||
var current_offset: Variant = material.get_shader_parameter("flow_offset")
|
||||
var flow_offset: float = current_offset if current_offset != null else 0.0
|
||||
flow_offset += config.flow_speed * wind_spd * delta
|
||||
|
||||
material.set_shader_parameter("flow_offset", flow_offset)
|
||||
material.set_shader_parameter("flow_direction", wind_dir)
|
||||
material.set_shader_parameter("evolution_offset", _evolution_offset)
|
||||
|
||||
|
||||
func _update_lighting() -> void:
|
||||
|
||||
@@ -41,7 +41,7 @@ func _ready() -> void:
|
||||
_ensure_controllers_exist()
|
||||
|
||||
_connect_signals()
|
||||
property_list_changed_notify()
|
||||
#property_list_changed_notify()
|
||||
_sync_preset_name()
|
||||
_apply_seed()
|
||||
_sync_all_systems()
|
||||
|
||||
@@ -12,6 +12,9 @@ signal weather_state_exited(state: WeatherProfile.WeatherState)
|
||||
@export var weather_profiles: Array[WeatherProfile] = []
|
||||
@export var current_weather: WeatherProfile.WeatherState = WeatherProfile.WeatherState.CLEAR:
|
||||
set(value):
|
||||
if _changing_weather:
|
||||
current_weather = value
|
||||
return
|
||||
if value != current_weather:
|
||||
_request_weather_change(value)
|
||||
|
||||
@@ -39,6 +42,7 @@ var _random_weather_timer: float = 0.0
|
||||
var _next_weather_change: float = 0.0
|
||||
var _timeline_index: int = 0
|
||||
var _timeline_timer: float = 0.0
|
||||
var _changing_weather: bool = false
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
@@ -175,7 +179,9 @@ func set_weather(state: WeatherProfile.WeatherState, transition_duration: float
|
||||
weather_state_exited.emit(_current_profile.weather_state)
|
||||
|
||||
var old_state := current_weather
|
||||
_changing_weather = true
|
||||
current_weather = state
|
||||
_changing_weather = false
|
||||
_target_profile = profile
|
||||
|
||||
if transition_duration < 0:
|
||||
@@ -199,7 +205,9 @@ func set_weather_immediate(state: WeatherProfile.WeatherState) -> void:
|
||||
weather_state_exited.emit(_current_profile.weather_state)
|
||||
|
||||
var old_state := current_weather
|
||||
_changing_weather = true
|
||||
current_weather = state
|
||||
_changing_weather = false
|
||||
_current_profile = profile
|
||||
_target_profile = profile
|
||||
_is_transitioning = false
|
||||
|
||||
@@ -26,7 +26,7 @@ enum VolumeShape {
|
||||
|
||||
@export_group("Kill Behavior")
|
||||
@export var enabled: bool = true
|
||||
@export var priority: int = 0
|
||||
@export var kill_priority: int = 0
|
||||
@export var instant_kill: bool = true
|
||||
@export var fade_out_margin: float = 1.0
|
||||
@export var fade_out_duration: float = 0.3
|
||||
@@ -222,11 +222,11 @@ func is_point_in_fade_margin(point: Vector3) -> bool:
|
||||
var half_size := volume_size * 0.5
|
||||
var inner_half := half_size - Vector3(fade_out_margin, fade_out_margin, fade_out_margin)
|
||||
|
||||
var in_outer := abs(local_point.x) <= half_size.x and \
|
||||
var in_outer: bool = abs(local_point.x) <= half_size.x and \
|
||||
abs(local_point.y) <= half_size.y and \
|
||||
abs(local_point.z) <= half_size.z
|
||||
|
||||
var in_inner := abs(local_point.x) <= inner_half.x and \
|
||||
var in_inner: bool = abs(local_point.x) <= inner_half.x and \
|
||||
abs(local_point.y) <= inner_half.y and \
|
||||
abs(local_point.z) <= inner_half.z
|
||||
|
||||
@@ -240,8 +240,8 @@ func is_point_in_fade_margin(point: Vector3) -> bool:
|
||||
var horizontal_dist := Vector2(local_point.x, local_point.z).length()
|
||||
var half_height := volume_size.y * 0.5
|
||||
|
||||
var in_outer := horizontal_dist <= volume_radius and abs(local_point.y) <= half_height
|
||||
var in_inner := horizontal_dist <= volume_radius - fade_out_margin and \
|
||||
var in_outer: bool = horizontal_dist <= volume_radius and abs(local_point.y) <= half_height
|
||||
var in_inner: bool = horizontal_dist <= volume_radius - fade_out_margin and \
|
||||
abs(local_point.y) <= half_height - fade_out_margin
|
||||
|
||||
return in_outer and not in_inner
|
||||
|
||||
Reference in New Issue
Block a user