Prevented rock smearing

This commit is contained in:
Joshua Barretto 2019-06-06 21:56:16 +01:00
parent 61dda0ea8c
commit a34aff3a8b

View File

@ -43,17 +43,17 @@ impl<'a> Sampler<'a> {
let rockiness = sim.get_interpolated(wpos, |chunk| chunk.rockiness)?;
let tree_density = sim.get_interpolated(wpos, |chunk| chunk.tree_density)?;
let rock = (sim.gen_ctx.small_nz.get((wposf.div(100.0)).into_array()) as f32)
.mul(rockiness)
.sub(0.35)
.max(0.0)
.mul(6.0);
let alt = sim.get_interpolated(wpos, |chunk| chunk.alt)?
+ sim.gen_ctx.small_nz.get((wposf.div(256.0)).into_array()) as f32
* chaos.max(0.2)
* 64.0;
let rock = (sim.gen_ctx.small_nz.get(Vec3::new(wposf.x, wposf.y, alt as f64).div(100.0).into_array()) as f32)
.mul(rockiness)
.sub(0.35)
.max(0.0)
.mul(6.0);
let wposf3d = Vec3::new(wposf.x, wposf.y, alt as f64);
let marble = (sim.gen_ctx.hill_nz.get((wposf3d.div(48.0)).into_array()) as f32)