From 712f7a4dc197a269968f1354923f08a22f2b9255 Mon Sep 17 00:00:00 2001 From: connnnal <216976529+connnnal@users.noreply.github.com> Date: Sun, 4 Jan 2026 20:06:58 +0000 Subject: [PATCH] Use correct normals for meshes loaded via fast_obj --- src/scene.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scene.cpp b/src/scene.cpp index c4ed275..052913a 100644 --- a/src/scene.cpp +++ b/src/scene.cpp @@ -144,7 +144,7 @@ static bool loadObj(std::vector& vertices, const char* path) v.tp = 0; v.np = (meshopt_quantizeSnorm(obj->normals[gi.n * 3 + 0], 10) + 511) | (meshopt_quantizeSnorm(obj->normals[gi.n * 3 + 1], 10) + 511) << 10 | - (meshopt_quantizeSnorm(obj->normals[gi.n * 3 + 1], 10) + 511) << 20; + (meshopt_quantizeSnorm(obj->normals[gi.n * 3 + 2], 10) + 511) << 20; v.tu = meshopt_quantizeHalf(obj->texcoords[gi.t * 2 + 0]); v.tv = meshopt_quantizeHalf(obj->texcoords[gi.t * 2 + 1]); }