From 8e2bc651b933249d349d51f38770408eb44f1186 Mon Sep 17 00:00:00 2001 From: Daniel Bross Date: Thu, 31 Jul 2025 00:52:39 +0200 Subject: [PATCH] Fixed plane mesh --- renderer/renderer.jai | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/renderer/renderer.jai b/renderer/renderer.jai index 5689c3d..913a337 100644 --- a/renderer/renderer.jai +++ b/renderer/renderer.jai @@ -738,20 +738,20 @@ init_default_meshes :: () { // Since this is used for sprites, we want the origin to be in the center in x, but at the bottom in y mesh : Mesh; mesh.name = copy_string("Plane"); - array_add(*mesh.positions, .{1, 0, 1}); - array_add(*mesh.positions, .{-1, 0, -1}); - array_add(*mesh.positions, .{1, 0, -1}); - array_add(*mesh.positions, .{-1, 0, 1}); + array_add(*mesh.positions, .{0.5, 0, 0.5}); + array_add(*mesh.positions, .{-0.5, 0, -0.5}); + array_add(*mesh.positions, .{0.5, 0, -0.5}); + array_add(*mesh.positions, .{-0.5, 0, 0.5}); array_add(*mesh.normals, .{0, 1, 0}); array_add(*mesh.normals, .{0, 1, 0}); array_add(*mesh.normals, .{0, 1, 0}); array_add(*mesh.normals, .{0, 1, 0}); - array_add(*mesh.texcoords, .{1, 0}); - array_add(*mesh.texcoords, .{0, 1}); array_add(*mesh.texcoords, .{1, 1}); array_add(*mesh.texcoords, .{0, 0}); + array_add(*mesh.texcoords, .{1, 0}); + array_add(*mesh.texcoords, .{0, 1}); array_add(*mesh.indices, 2); array_add(*mesh.indices, 1);