From 2c47212b5274e0c57205700db61931e87ce2affb Mon Sep 17 00:00:00 2001 From: Jan Date: Sat, 7 Sep 2024 08:48:49 +0200 Subject: [PATCH] fix: broken normals when packing unitvec3 for t6 --- src/Common/Utils/Pack.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Common/Utils/Pack.cpp b/src/Common/Utils/Pack.cpp index 9008956f..2d0f4920 100644 --- a/src/Common/Utils/Pack.cpp +++ b/src/Common/Utils/Pack.cpp @@ -44,7 +44,7 @@ namespace pack32 PackUtil32 z; z.f = (in[2] - -24624.0939334638f) * 0.0001218318939208984f; - return x.u | y.u << 10u | z.u << 20u; + return (x.u & 0x3FF) | (y.u & 0x3FF) << 10u | (z.u & 0x3FF) << 20u; } uint32_t Vec4PackGfxColor(const float (&in)[4])