From 9ed330d8fe1f6dae222b1c5a3492ef85dcffbaa4 Mon Sep 17 00:00:00 2001 From: Joshua Barretto Date: Sat, 25 May 2019 00:00:44 +0100 Subject: [PATCH] Improved sea-like slopes Former-commit-id: 4b3ba56dcf6d99db7e48c169d42e042811872fd3 --- world/src/sim.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/world/src/sim.rs b/world/src/sim.rs index 466168dac6..035c083bbd 100644 --- a/world/src/sim.rs +++ b/world/src/sim.rs @@ -184,7 +184,7 @@ impl<'a> Sampler<'a> { Rgb::lerp( cliff, snow, - (alt - SEA_LEVEL - 320.0 - alt_base - temp * 48.0) / 12.0, + (alt - SEA_LEVEL - 350.0 - alt_base - temp * 48.0) / 12.0, ), (alt - SEA_LEVEL - 150.0) / 180.0 ), @@ -325,6 +325,7 @@ impl SimChunk { let alt_base = gen_ctx.alt_nz.get((wposf.div(6_000.0)).into_array()) as f32; let alt_base = alt_base .mul(0.4) + .add(alt_base.mul(128.0).sin().mul(0.004)) .mul(600.0); let alt_main = gen_ctx.alt_nz.get((wposf.div(1_500.0)).into_array()) as f32; @@ -354,7 +355,7 @@ impl SimChunk { } pub fn get_base_z(&self) -> f32 { - self.alt - Z_TOLERANCE.0 * (self.chaos + 0.1) + self.alt - Z_TOLERANCE.0 * (self.chaos + 0.1) - 3.0 } pub fn get_max_z(&self) -> f32 {