mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Better cliffs
This commit is contained in:
parent
e5b02ff7da
commit
7ea9e32acf
@ -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(
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user