From 64ddcf7e10d0f83b5b35137805f505ca9c5160cd Mon Sep 17 00:00:00 2001 From: Jarrod Doyle Date: Tue, 27 Jun 2023 20:23:09 +0100 Subject: [PATCH] Fix incorrect chunk noise offsets --- src/voxel/world.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/voxel/world.rs b/src/voxel/world.rs index a999470..acee0f1 100644 --- a/src/voxel/world.rs +++ b/src/voxel/world.rs @@ -121,11 +121,11 @@ impl WorldManager { // block of each axis step outside of our 0..N bounds, sharing a value with the // neighbouring chunk 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, - pos.y as f32, + pos.y as f32 * self.chunk_dims.y as f32, 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, ) .with_seed(self.settings.seed)