M1c: weather, snap building, shelter, beds and regrowth
- Seeded weather (clear/cloudy/rain/storm, snow and blizzards on cold days and above the snowline), lightning, synthesised rain/wind/thunder sound - Rain/snow particles stopped by roofs; wet ground, settled snow and wind via global shader uniforms - Snap-together wood floor, wall, door, roof and gable with structural support, collapse and X to dismantle - Shelter detection: dry under a roof, warmer and Rested inside with a fire; rain burns an uncovered campfire faster - Bed sets the spawn point and lets you sleep through the night - Trees, boulders and ground pickups regrow; timers saved - Grass cleared under floors; shorter HUD hint - New test_weather_building suite (62 checks) and tests/run_all.sh, which also fails on script errors
This commit is contained in:
@@ -33,8 +33,13 @@ void fragment() {
|
||||
float snow = smoothstep(snow_height - 3.0, snow_height + 3.0, w_pos.y + (a - 0.5) * 10.0);
|
||||
snow *= smoothstep(0.35, 0.7, w_nrm.y);
|
||||
col = mix(col, snow_col, snow);
|
||||
float wsnow = snow_mask(w_nrm.y, a);
|
||||
col = mix(col, snow_col, wsnow);
|
||||
snow = max(snow, wsnow);
|
||||
float wet = weather_wet * (1.0 - snow);
|
||||
col = wet_albedo(col, wet);
|
||||
|
||||
ALBEDO = col;
|
||||
ROUGHNESS = mix(mix(0.8, 0.95, moss), 0.6, snow);
|
||||
ROUGHNESS = mix(mix(mix(0.8, 0.95, moss), 0.6, snow), 0.3, wet * 0.8);
|
||||
SPECULAR = 0.35;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user