Browse Source

Fixed Snorm2x16 packing

Christophe Riccio 12 years ago
parent
commit
966c049ce6
1 changed files with 1 additions and 1 deletions
  1. 1 1
      glm/core/func_packing.inl

+ 1 - 1
glm/core/func_packing.inl

@@ -47,7 +47,7 @@ namespace glm
 	{
 	{
 		i16vec2 Unpack(round(clamp(v ,-1.0f, 1.0f) * 32767.0f));
 		i16vec2 Unpack(round(clamp(v ,-1.0f, 1.0f) * 32767.0f));
 		u32vec2 Topack(*reinterpret_cast<u16vec2*>(&Unpack));
 		u32vec2 Topack(*reinterpret_cast<u16vec2*>(&Unpack));
-		return (Topack.x << 16) | (Topack.y << 0);
+		return (Topack.y << 16) | (Topack.x << 0);
 	}
 	}
 
 
 	GLM_FUNC_QUALIFIER vec2 unpackSnorm2x16(uint32 const & p)
 	GLM_FUNC_QUALIFIER vec2 unpackSnorm2x16(uint32 const & p)