Better cliffs

This commit is contained in:
Joshua Barretto 2021-02-14 21:46:06 +00:00
parent e5b02ff7da
commit 7ea9e32acf
2 changed files with 2 additions and 2 deletions

View File

@ -121,7 +121,7 @@ impl<'a> BlockGen<'a> {
if stone_factor >= 0.5 {
if wposf.z as f32 > height - cliff_offset.max(0.0) {
if cliff_offset.max(0.0) > cliff_height - (FastNoise::new(37).get(wposf / Vec3::new(6.0, 6.0, 10.0)) * 0.5 + 0.5) * (height - wposf.z as f32).mul(0.25).clamped(0.0, 10.0) {
if cliff_offset.max(0.0) > cliff_height - (FastNoise::new(37).get(wposf / Vec3::new(6.0, 6.0, 10.0)) * 0.5 + 0.5) * (height - wposf.z as f32).mul(0.25).clamped(0.0, 6.0) {
Some(Block::empty())
} else {
let col = Lerp::lerp(

View File

@ -274,7 +274,7 @@ impl<'a> Sampler<'a> for ColumnGen<'a> {
.rem_euclid(128.0)
/ 64.0
- 1.0;
let cliff_scale = (self.sim.gen_ctx.hill_nz.get(wposf.div(128.0).into_array())
let cliff_scale = ((self.sim.gen_ctx.hill_nz.get(wposf.div(128.0).into_array()) * 2.0 - 1.0)
+ self.sim.gen_ctx.hill_nz.get(wposf.div(48.0).into_array()) * 0.1
+ 0.5)
.max(0.0) as f32;