fix clouds
This commit is contained in:
@@ -110,7 +110,7 @@ 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.81767046, 0.53474194, 0.21322787)
|
||||
shader_parameter/sun_direction = Vector3(-0.92782164, 0.34649342, 0.13816392)
|
||||
shader_parameter/sun_glow_color = Color(1, 0.95, 0.85, 1)
|
||||
shader_parameter/sun_glow_intensity = 0.3
|
||||
shader_parameter/sun_glow_size = 0.2
|
||||
|
||||
@@ -40,6 +40,9 @@ var _debug_canvas_layer: CanvasLayer
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
if show_debug_panel && _debug_panel == null:
|
||||
_create_debug_panel()
|
||||
|
||||
if auto_create_controllers:
|
||||
_ensure_controllers_exist()
|
||||
|
||||
@@ -300,22 +303,16 @@ func _sync_post_process() -> void:
|
||||
_current_config.sun_glow_intensity,
|
||||
_current_config.sun_glow_size
|
||||
)
|
||||
post_process_controller.set_fog_settings(
|
||||
_current_config.fog_color,
|
||||
_current_config.fog_density
|
||||
)
|
||||
post_process_controller.set_dawn_dusk_blend(0.0)
|
||||
post_process_controller.set_stars_visibility(
|
||||
_current_config.stars_visibility,
|
||||
_current_config.stars_tint
|
||||
)
|
||||
post_process_controller.set_sky_colors(
|
||||
_current_config.sky_top_color,
|
||||
_current_config.sky_horizon_color,
|
||||
_current_config.sky_bottom_color
|
||||
)
|
||||
post_process_controller.gradient_intensity = _current_config.gradient_intensity
|
||||
post_process_controller.apply_config(_current_config)
|
||||
post_process_controller.set_dawn_dusk_blend(0.0)
|
||||
var cfg_fog_color := day_night_controller.get_fog_color()
|
||||
var cfg_fog_density := day_night_controller.get_fog_density()
|
||||
if weather_controller:
|
||||
var wp := weather_controller.get_current_profile()
|
||||
if wp:
|
||||
cfg_fog_color *= wp.fog_color_multiplier
|
||||
cfg_fog_density *= wp.fog_density_multiplier
|
||||
post_process_controller.set_fog_settings(cfg_fog_color, cfg_fog_density)
|
||||
else:
|
||||
var sun_color := day_night_controller.get_sun_color()
|
||||
post_process_controller.set_sun_glow(
|
||||
@@ -464,8 +461,6 @@ func _sync_weather_vfx() -> void:
|
||||
func _update_debug_info() -> void:
|
||||
if Engine.is_editor_hint():
|
||||
return
|
||||
if _debug_panel == null:
|
||||
_create_debug_panel()
|
||||
_debug_panel.visible = true
|
||||
|
||||
|
||||
@@ -494,7 +489,6 @@ func set_time_of_day(time: float) -> void:
|
||||
|
||||
|
||||
func set_weather(state: WeatherProfile.WeatherState, transition_time: float = -1.0) -> void:
|
||||
_current_config = null
|
||||
if weather_controller:
|
||||
weather_controller.set_weather(state, transition_time)
|
||||
|
||||
|
||||
@@ -201,7 +201,7 @@ func _update_labels() -> void:
|
||||
|
||||
if dynamic_sky.weather_controller.is_transitioning():
|
||||
var progress := dynamic_sky.weather_controller.get_transition_progress()
|
||||
_weather_label.text += " (transitioning %.0f%%)" % (progress * 100)
|
||||
_weather_label.text += " (transition %.0f%%)" % (progress * 100)
|
||||
|
||||
if dynamic_sky.weather_controller:
|
||||
var rain := dynamic_sky.weather_controller.get_rain_intensity()
|
||||
|
||||
@@ -11,8 +11,8 @@ extends Node3D
|
||||
|
||||
@export_group("Snow")
|
||||
@export var snow_amount: int = 2000
|
||||
@export var snow_area: Vector3 = Vector3(80.0, 30.0, 80.0)
|
||||
@export var snow_speed: float = 3.0
|
||||
@export var snow_area: Vector3 = Vector3(80.0, 12.0, 80.0)
|
||||
@export var snow_speed: float = 4.0
|
||||
@export var snow_color: Color = Color(0.95, 0.95, 1.0, 0.8)
|
||||
|
||||
@export_group("Lightning")
|
||||
@@ -159,7 +159,7 @@ func _create_snow_system() -> void:
|
||||
_snow_particles = GPUParticles3D.new()
|
||||
_snow_particles.name = "SnowParticles"
|
||||
_snow_particles.amount = snow_amount
|
||||
_snow_particles.lifetime = snow_area.y / snow_speed * 2.5
|
||||
_snow_particles.lifetime = snow_area.y / snow_speed * 2.0
|
||||
_snow_particles.emitting = false
|
||||
_snow_particles.visibility_aabb = AABB(-snow_area / 2.0, snow_area)
|
||||
|
||||
@@ -168,11 +168,11 @@ func _create_snow_system() -> void:
|
||||
mat.spread = 15.0
|
||||
mat.initial_velocity_min = snow_speed * 0.5
|
||||
mat.initial_velocity_max = snow_speed * 1.0
|
||||
mat.gravity = Vector3(0.0, -1.0, 0.0)
|
||||
mat.gravity = Vector3(0.0, -3, 0.0)
|
||||
mat.emission_shape = ParticleProcessMaterial.EMISSION_SHAPE_BOX
|
||||
mat.emission_box_extents = Vector3(snow_area.x / 2.0, 0.5, snow_area.z / 2.0)
|
||||
mat.emission_box_extents = Vector3(snow_area.x / 2.0, 1.0, snow_area.z / 2.0)
|
||||
mat.turbulence_enabled = true
|
||||
mat.turbulence_noise_strength = 2.0
|
||||
mat.turbulence_noise_strength = 1.5
|
||||
mat.turbulence_noise_speed_random = 0.5
|
||||
mat.turbulence_noise_scale = 4.0
|
||||
_snow_particles.process_material = mat
|
||||
@@ -184,7 +184,7 @@ func _create_snow_system() -> void:
|
||||
_snow_material.set_shader_parameter("alpha_mult", 0.0)
|
||||
|
||||
var mesh := QuadMesh.new()
|
||||
mesh.size = Vector2(0.08, 0.08)
|
||||
mesh.size = Vector2(0.12, 0.12)
|
||||
mesh.material = _snow_material
|
||||
_snow_particles.draw_pass_1 = mesh
|
||||
|
||||
|
||||
Reference in New Issue
Block a user