From 966c049ce67fc71afdb0d44b4402a05a4f515b9f Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Sun, 8 Sep 2013 03:45:30 +0200 Subject: [PATCH] Fixed Snorm2x16 packing --- glm/core/func_packing.inl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glm/core/func_packing.inl b/glm/core/func_packing.inl index 0d21a20b..51e7259e 100644 --- a/glm/core/func_packing.inl +++ b/glm/core/func_packing.inl @@ -47,7 +47,7 @@ namespace glm { i16vec2 Unpack(round(clamp(v ,-1.0f, 1.0f) * 32767.0f)); u32vec2 Topack(*reinterpret_cast(&Unpack)); - return (Topack.x << 16) | (Topack.y << 0); + return (Topack.y << 16) | (Topack.x << 0); } GLM_FUNC_QUALIFIER vec2 unpackSnorm2x16(uint32 const & p)