fix materials for wind and add new snow system

This commit is contained in:
2026-04-24 15:36:10 +02:00
parent ab87c7f478
commit 211455f5da
18 changed files with 364 additions and 45 deletions

View File

@@ -139,9 +139,15 @@ extends Resource
@export var snow_transaction_time: float = 10.0 #Seconds for snow shader to fully transition in/out
@export var snow_fade_time: float = 5.0 #Seconds for snow particles to fade in/out
@export var snow_threshold: float = 0.4 #Normal Y threshold for snow accumulation on surfaces
@export var snow_accumulation_speed: float = 0.02 #Accumulation speed: 0.1 -> 10s, 0.05 -> 20s, 0.02 -> 50s, 0.2 -> 5s
@export var snow_accumulation_speed: float = 0.018 #Accumulation speed: 0.1 -> 10s, 0.05 -> 20s, 0.02 -> 50s, 0.012 -> ~83s
@export var snow_melt_speed: float = 0.05 #Speed at which accumulated snow melts away
@export var snow_max_accumulation: float = 0.3 #Maximum accumulated snow factor applied to coverage and thickness
@export var snow_color: Color = Color(0.9, 0.95, 1.0) #Albedo color of snow on surfaces
@export var snow_cap_height: float = 0.03 #Maximum snow thickness extruded on flat surfaces
@export var snow_cap_flatness_start: float = 0.85 #Surface normal Y where cap buildup starts
@export var snow_cap_flatness_end: float = 0.96 #Surface normal Y where cap buildup reaches full effect
@export var snow_cap_noise_scale: float = 0.22 #Noise scale used to vary the snow cap silhouette
@export var snow_cap_noise_strength: float = 0.12 #How much the cap noise changes the accumulated thickness
@export var snow_mode_color: Color = Color(0.556, 0.62, 0.683, 1.0) #Sky/light darkening color during snow
#Wind settings
@@ -152,7 +158,7 @@ extends Resource
@export var wind_direction: Vector2 = Vector2(0.5, 0.4) #Global wind direction (XZ)
@export var wind_speed: float = 0.2 #Global wind animation speed
@export var wind_scale: float = 0.025 #Global wind noise scale
@export var wind_strength: float = 0.6 #Global wind displacement strength
@export var wind_strength: float = 0.3 #Global wind displacement strength
@export var cloud_scale: float = 0.5 #Cloud noise scale in sky shader
@export var cloud_speed: float = 0.05 #Cloud movement speed in sky shader
@export_range(0.01, 1.0) var cloud_scale_envshadows_rate: float = 0.01 #Cloud scale multiplier for environment shadows