fix clouds

This commit is contained in:
Overside srl
2026-02-17 16:00:53 +01:00
parent f7ec818c23
commit c7d2ae14b3
16 changed files with 36 additions and 51 deletions

View File

@@ -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

View File

@@ -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)

View File

@@ -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()

View File

@@ -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

View File

@@ -98,7 +98,7 @@ script_export_mode=2
custom_template/debug=""
custom_template/release=""
variant/extensions_support=false
variant/extensions_support=true
variant/thread_support=false
vram_texture_compression/for_desktop=true
vram_texture_compression/for_mobile=false

View File

@@ -70,6 +70,11 @@ toggle_debug={
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194334,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
]
}
change_camera={
"deadzone": 0.5,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":32,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
]
}
[rendering]

Binary file not shown.

View File

@@ -1,19 +0,0 @@
[remap]
importer="mp3"
type="AudioStreamMP3"
uid="uid://bdluyy5uodjb5"
path="res://.godot/imported/thomastanks_new.mp3-faeee3575032f4283c1731a17141e11b.mp3str"
[deps]
source_file="res://resources/thomastanks_new.mp3"
dest_files=["res://.godot/imported/thomastanks_new.mp3-faeee3575032f4283c1731a17141e11b.mp3str"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

View File

@@ -111,7 +111,7 @@ text = "Comandi:
\"SPACE - Cambia camera\",
\"TAB - Cambia treno\",
\"ENTER - Fischio\",
\"F3 - Debug Sky\",
\"F3 - Dynamic Sky Debug\",
\"ESC - Esci\""
label_settings = SubResource("LabelSettings_tefeu")

View File

@@ -30,6 +30,11 @@ func _ready() -> void:
train.track_generator = track_generator
camera.train = train
#hide debug panel for sky
var sky := get_node_or_null("DynamicSky") as DynamicSkyRoot
if sky and sky._debug_canvas_layer:
sky._debug_canvas_layer.visible = false
# Terreno
var ground = MeshInstance3D.new()
ground.name = "Ground"

View File

@@ -34,7 +34,7 @@ func _process(delta: float) -> void:
func _handle_input(delta: float) -> void:
if Input.is_action_just_pressed("ui_accept"):
if Input.is_action_just_pressed("change_camera"):
mode = ((mode + 1) % CameraMode.size()) as CameraMode
orbit_angle = 0.0

View File

@@ -111,7 +111,7 @@ body {
<script src="index.js"></script>
<script>
const GODOT_CONFIG = {"args":[],"canvasResizePolicy":2,"emscriptenPoolSize":8,"ensureCrossOriginIsolationHeaders":true,"executable":"index","experimentalVK":false,"fileSizes":{"index.pck":58252996,"index.wasm":35740641},"focusCanvas":true,"gdextensionLibs":[],"godotPoolSize":4};
const GODOT_CONFIG = {"args":[],"canvasResizePolicy":2,"emscriptenPoolSize":8,"ensureCrossOriginIsolationHeaders":true,"executable":"index","experimentalVK":false,"fileSizes":{"index.pck":58276272,"index.wasm":1508102},"focusCanvas":true,"gdextensionLibs":[],"godotPoolSize":4};
const GODOT_THREADS_ENABLED = false;
const engine = new Engine(GODOT_CONFIG);

File diff suppressed because one or more lines are too long

Binary file not shown.

BIN
web/index.side.wasm Normal file

Binary file not shown.

Binary file not shown.