Better warp noise

This commit is contained in:
Joshua Barretto 2019-09-21 22:18:55 +01:00
parent a9d7cfac0b
commit b6e72b0075
2 changed files with 8 additions and 4 deletions

View File

@ -170,14 +170,14 @@ impl<'a> Sampler<'a> for ColumnGen<'a> {
.small_nz
.get((wposf_turb.div(200.0)).into_array()) as f32)
.abs()
.mul(chaos.max(0.025))
.mul(75.0)
.mul(chaos.max(0.05))
.mul(55.0)
+ (sim
.gen_ctx
.small_nz
.get((wposf_turb.div(450.0)).into_array()) as f32)
.get((wposf_turb.div(600.0)).into_array()) as f32)
.abs()
.mul(1.0 - chaos)
.mul((1.0 - chaos).max(0.3))
.mul(1.0 - humidity)
.mul(85.0);

View File

@ -123,6 +123,10 @@ impl TownState {
let radius = rng.gen_range(18, 20) * 9;
let size = Vec2::broadcast(radius * 2 / 9 - 2);
if gen.get(center).map(|sample| sample.chaos).unwrap_or(0.0) > 0.35 {
return None;
}
let alt = gen.get(center).map(|sample| sample.alt).unwrap_or(0.0) as i32;
let mut vol = TownVol::generate_from(