mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Attempted rivers
This commit is contained in:
parent
3e56c65e86
commit
704e65cb41
@ -35,6 +35,7 @@ impl<'a> Sampler for ColumnGen<'a> {
|
||||
let alt_base = sim.get_interpolated(wpos, |chunk| chunk.alt_base)?;
|
||||
let chaos = sim.get_interpolated(wpos, |chunk| chunk.chaos)?;
|
||||
let temp = sim.get_interpolated(wpos, |chunk| chunk.temp)?;
|
||||
let dryness = sim.get_interpolated(wpos, |chunk| chunk.dryness)?;
|
||||
let rockiness = sim.get_interpolated(wpos, |chunk| chunk.rockiness)?;
|
||||
let cliffiness = sim.get_interpolated(wpos, |chunk| chunk.cliffiness)?;
|
||||
let tree_density = sim.get_interpolated(wpos, |chunk| chunk.tree_density)?;
|
||||
@ -45,7 +46,8 @@ impl<'a> Sampler for ColumnGen<'a> {
|
||||
+ (sim.gen_ctx.small_nz.get((wposf.div(256.0)).into_array()) as f32)
|
||||
.abs()
|
||||
.mul(chaos.max(0.2))
|
||||
.mul(64.0);
|
||||
.mul(64.0)
|
||||
- dryness.abs().neg().add(0.03).max(0.0).mul(3000.0);
|
||||
|
||||
let rock = (sim.gen_ctx.small_nz.get(
|
||||
Vec3::new(wposf.x, wposf.y, alt as f64)
|
||||
|
@ -232,6 +232,7 @@ pub struct SimChunk {
|
||||
pub alt_base: f32,
|
||||
pub alt: f32,
|
||||
pub temp: f32,
|
||||
pub dryness: f32,
|
||||
pub rockiness: f32,
|
||||
pub cliffiness: f32,
|
||||
pub tree_density: f32,
|
||||
@ -255,15 +256,15 @@ impl SimChunk {
|
||||
.add(0.3)
|
||||
.max(0.0);
|
||||
|
||||
let dryness = (gen_ctx.chaos_nz.get((wposf.div(1_000.0)).into_array()) as f32);
|
||||
|
||||
let chaos = (gen_ctx.chaos_nz.get((wposf.div(4_000.0)).into_array()) as f32)
|
||||
.add(1.0)
|
||||
.mul(0.5)
|
||||
.mul(
|
||||
(gen_ctx.chaos_nz.get((wposf.div(8_000.0)).into_array()) as f32)
|
||||
.powf(2.0)
|
||||
.add(0.5)
|
||||
.min(1.0),
|
||||
)
|
||||
.mul((gen_ctx.chaos_nz.get((wposf.div(8_000.0)).into_array()) as f32)
|
||||
.powf(2.0)
|
||||
.add(0.5)
|
||||
.min(1.0))
|
||||
.powf(1.4)
|
||||
.add(0.1 * hill);
|
||||
|
||||
@ -299,6 +300,7 @@ impl SimChunk {
|
||||
alt_base,
|
||||
alt,
|
||||
temp,
|
||||
dryness,
|
||||
rockiness: (gen_ctx.rock_nz.get((wposf.div(1024.0)).into_array()) as f32)
|
||||
.sub(0.1)
|
||||
.mul(1.3)
|
||||
|
Loading…
Reference in New Issue
Block a user