Removed dryness

This commit is contained in:
Joshua Barretto 2019-08-23 16:41:02 +01:00
parent 4735d3d6da
commit 75f5419571
2 changed files with 1 additions and 23 deletions

View File

@ -142,7 +142,6 @@ 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 humidity = sim.get_interpolated(wpos, |chunk| chunk.humidity)?;
let rockiness = sim.get_interpolated(wpos, |chunk| chunk.rockiness)?;
let tree_density = sim.get_interpolated(wpos, |chunk| chunk.tree_density)?;

View File

@ -491,7 +491,6 @@ pub struct SimChunk {
pub alt_base: f32,
pub alt: f32,
pub temp: f32,
pub dryness: f32,
pub humidity: f32,
pub rockiness: f32,
pub is_cliffs: bool,
@ -521,22 +520,6 @@ impl SimChunk {
let pos = uniform_idx_as_vec2(posi);
let wposf = (pos * TerrainChunkSize::SIZE.map(|e| e as i32)).map(|e| e as f64);
// FIXME: Currently unused, but should represent fresh groundwater level.
// Should be correlated a little with humidity, somewhat negatively with altitude,
// and very negatively with difference in temperature from zero.
let dryness = gen_ctx.dry_nz.get(
(wposf
.add(Vec2::new(
gen_ctx
.dry_nz
.get((wposf.add(10000.0).div(500.0)).into_array())
* 150.0,
gen_ctx.dry_nz.get((wposf.add(0.0).div(500.0)).into_array()) * 150.0,
))
.div(2_000.0))
.into_array(),
) as f32;
let (_, alt_base) = gen_cdf.alt_base[posi];
let map_edge_factor = map_edge_factor(posi);
let (_, chaos) = gen_cdf.chaos[posi];
@ -606,16 +589,12 @@ impl SimChunk {
alt_base,
alt,
temp,
dryness,
humidity,
rockiness: (gen_ctx.rock_nz.get((wposf.div(1024.0)).into_array()) as f32)
.sub(0.1)
.mul(1.3)
.max(0.0),
is_cliffs: cliff > 0.5
&& dryness > 0.05
&& alt > CONFIG.sea_level + 5.0
&& dryness.abs() > 0.075,
is_cliffs: cliff > 0.5 && alt > CONFIG.sea_level + 5.0,
near_cliffs: cliff > 0.25,
tree_density,
forest_kind: if temp > 0.0 {