Merge pull request #253 from Laupetin/fix/gltf-model-import-2

fix: broken normals when packing unitvec3 for t6
This commit is contained in:
Jan 2024-09-07 09:10:19 +02:00 committed by GitHub
commit bc81245322
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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])