Fix incorrect chunk noise offsets

This commit is contained in:
Jarrod Doyle 2023-06-27 20:23:09 +01:00
parent f57bf565e4
commit 64ddcf7e10
Signed by: Jayrude
GPG Key ID: 38B57B16E7C0ADF7
1 changed files with 3 additions and 3 deletions

View File

@ -121,11 +121,11 @@ impl WorldManager {
// block of each axis step outside of our 0..N bounds, sharing a value with the // block of each axis step outside of our 0..N bounds, sharing a value with the
// neighbouring chunk // neighbouring chunk
let noise = simdnoise::NoiseBuilder::fbm_3d_offset( let noise = simdnoise::NoiseBuilder::fbm_3d_offset(
pos.x as f32, pos.x as f32 * self.chunk_dims.x as f32,
self.chunk_dims.x as usize + 1, self.chunk_dims.x as usize + 1,
pos.y as f32, pos.y as f32 * self.chunk_dims.y as f32,
self.chunk_dims.y as usize + 1, self.chunk_dims.y as usize + 1,
pos.z as f32, pos.z as f32 * self.chunk_dims.z as f32,
self.chunk_dims.z as usize + 1, self.chunk_dims.z as usize + 1,
) )
.with_seed(self.settings.seed) .with_seed(self.settings.seed)