Fix chunk noise.

This commit is contained in:
Joshua Yanovski 2022-07-01 23:57:09 -07:00
parent 59aacc3fd8
commit 957467e114
2 changed files with 4 additions and 4 deletions

View File

@ -2870,11 +2870,11 @@ spawn_rate {:?} "#,
col.alt,
water_alt,
col.water_level,
basement,
/*basement*/col.basement,
river,
gradient,
/*gradient*/col.gradient,
downhill,
chaos,
/*chaos*/col.chaos,
flux,
temp,
humidity,

View File

@ -670,7 +670,7 @@ impl<'a, 'b> Sampler<'a, 'b> for ColumnGen1D<'a, 'b> {
const SAMP_RES: i32 = 8;
const SAMP_RES_X: f32 = SAMP_RES as f32 / TerrainChunkSize::RECT_SIZE.x as f32;
const SAMP_RES_Y: f32 = SAMP_RES as f32 / TerrainChunkSize::RECT_SIZE.y as f32;
let cubic_delta = |x, delta: f32| cubic(x + SAMP_RES_X);
let cubic_delta = |x, delta: f32| cubic(x + delta);
let alt_y = &self.alt_spline/*.eval_at_row(cubic_y)*/;
let altx0 = alt_y.eval_at(cubic_delta(wposx, -SAMP_RES_X));
let altx1 = alt_y.eval_at(cubic_delta(wposx, SAMP_RES_X));