Better rain threshold

This commit is contained in:
Joshua Barretto 2022-03-15 15:51:41 +00:00 committed by IsseW
parent 767093105f
commit 48117988e1
2 changed files with 3 additions and 2 deletions

View File

@ -61,7 +61,7 @@ vec4 cloud_at(vec3 pos, float dist, out vec3 emission, out float not_underground
;
}
float cloud_alt = alt + 1500;
float cloud_alt = alt + 1800;
//vec2 cloud_attr = get_cloud_heights(wind_pos.xy);
float sun_access = 0.0;

View File

@ -184,8 +184,9 @@ impl WeatherSim {
let pressure = (base_nz.get(spos.into_array()) * 0.5 + 1.0).clamped(0.0, 1.0) as f32;
const RAIN_CLOUD_THRESHOLD: f32 = 0.26;
cell.cloud = (1.0 - pressure) * 0.5;
cell.rain = (1.0 - pressure - 0.15).max(0.0).powf(1.5);
cell.rain = (1.0 - pressure - RAIN_CLOUD_THRESHOLD).max(0.0).powf(1.0);
cell.wind = Vec2::new(
rain_nz.get(spos.into_array()) as f32,
rain_nz.get((spos + 1.0).into_array()) as f32,