Gentler warp, especially for high chunk size.

This commit is contained in:
Joshua Yanovski 2020-01-11 20:59:18 +01:00
parent 8d5a5af2cb
commit 5fd8b009a6

View File

@ -811,23 +811,24 @@ impl<'a> Sampler<'a> for ColumnGen<'a> {
let riverless_alt_delta = (sim
.gen_ctx
.small_nz
.get((wposf_turb.div(/*200.0*/50.0/*24.0*//*56.0 / (chaos as f64).max(0.05)*//*50.0*/)).into_array()) as f32)
.get((wposf_turb.div(/*200.0*//*50.0*/200.0 * (32.0 / TerrainChunkSize::RECT_SIZE.x as f64)/*24.0*//*56.0 / (chaos as f64).max(0.05)*//*50.0*/)).into_array()) as f32)
.min(1.0).max(-1.0)
// .mul(0.5).add(0.5)
.abs()
.mul(3.0)
/* .mul(chaos.max(0.05))
.mul(27.0)
// .mul(chaos.min(1.0).max(0.05))
/* .mul(27.0) */
+ (sim
.gen_ctx
.small_nz
.get((wposf_turb.div(400.0)).into_array()) as f32)
.get((wposf_turb.div(400.0 * (32.0 / TerrainChunkSize::RECT_SIZE.x as f64))).into_array()) as f32)
.min(1.0).max(-1.0)
// .mul(0.5).add(0.5)
.abs()
.mul((1.0 - chaos).max(0.3))
.mul(1.0 - humidity)
.mul(32.0) */;
.mul(3.0)
/* .mul((1.0 - chaos).min(1.0).max(0.3))
.mul(1.0 - humidity) */
/* .mul(32.0) */;
let riverless_alt_delta = Lerp::lerp(0.0, riverless_alt_delta, warp_factor);