From 55b79f0b3931fec727a725f988d458de67093f08 Mon Sep 17 00:00:00 2001 From: Jarrod Doyle Date: Mon, 24 Apr 2023 09:49:07 +0100 Subject: [PATCH] Fix voxel sphere offset --- src/render/renderer.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/render/renderer.rs b/src/render/renderer.rs index 4eeee2d..0bca012 100644 --- a/src/render/renderer.rs +++ b/src/render/renderer.rs @@ -45,7 +45,7 @@ impl Renderer { for z in 0..8 { for y in 0..8 { for x in 0..8 { - let pos = glam::vec3(x as f32, y as f32, z as f32) - glam::vec3(4.0, 4.0, 4.0); + let pos = glam::vec3(x as f32, y as f32, z as f32) - glam::vec3(3.5, 3.5, 3.5); if pos.length_squared() <= (u32::pow(4, 2) as f32) { data.push(((x + 1) * 32 - 1) as u8); data.push(((y + 1) * 32 - 1) as u8);