From 01d598220b403f4ac4da3b7aa1f0ce398be3198f Mon Sep 17 00:00:00 2001 From: omnisci3nce Date: Thu, 18 Jul 2024 23:10:11 +1000 Subject: skybox works --- src/maths/primitives.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/maths') diff --git a/src/maths/primitives.c b/src/maths/primitives.c index 04977a6..233a7e0 100644 --- a/src/maths/primitives.c +++ b/src/maths/primitives.c @@ -117,6 +117,9 @@ Geometry Geo_CreateCuboid(f32x3 extents) { for (u32 i = 0; i < vertices->len; i++) { u32_darray_push(indices, i); + vertices->data[i].static_3d.position = + vec3_sub(vertices->data[i].static_3d.position, + vec3(0.5, 0.5, 0.5)); // make center of the cube is the origin of mesh space } Geometry geo = { -- cgit v1.2.3-70-g09d2