Browse Source

- Fixed packF3x9_E1x5 exponent packing #614

Christophe Riccio 8 years ago
parent
commit
c6a8b4464b
2 changed files with 2 additions and 1 deletions
  1. 1 1
      glm/gtc/packing.inl
  2. 1 0
      readme.md

+ 1 - 1
glm/gtc/packing.inl

@@ -618,7 +618,7 @@ namespace detail
 		float const MaxColor = max(Color.x, max(Color.y, Color.z));
 		float const MaxColor = max(Color.x, max(Color.y, Color.z));
 
 
 		float const ExpSharedP = max(-15.f - 1.f, floor(log2(MaxColor))) + 1.0f + 15.f;
 		float const ExpSharedP = max(-15.f - 1.f, floor(log2(MaxColor))) + 1.0f + 15.f;
-		float const MaxShared = floor(MaxColor / pow(2.0f, (ExpSharedP - 16.f - 9.f)) + 0.5f);
+		float const MaxShared = floor(MaxColor / pow(2.0f, (ExpSharedP - 15.f - 9.f)) + 0.5f);
 		float const ExpShared = MaxShared == pow(2.0f, 9.0f) ? ExpSharedP + 1.0f : ExpSharedP;
 		float const ExpShared = MaxShared == pow(2.0f, 9.0f) ? ExpSharedP + 1.0f : ExpSharedP;
 
 
 		uvec3 const ColorComp(floor(Color / pow(2.f, (ExpShared - 15.f - 9.f)) + 0.5f));
 		uvec3 const ColorComp(floor(Color / pow(2.f, (ExpShared - 15.f - 9.f)) + 0.5f));

+ 1 - 0
readme.md

@@ -54,6 +54,7 @@ glm::mat4 camera(float Translate, glm::vec2 const & Rotate)
 #### [GLM 0.9.8.5](https://github.com/g-truc/glm/tree/0.9.8) - 2017-0X-XX
 #### [GLM 0.9.8.5](https://github.com/g-truc/glm/tree/0.9.8) - 2017-0X-XX
 ##### Fixes:
 ##### Fixes:
 - Fixed Clang version detection from source #608
 - Fixed Clang version detection from source #608
+- Fixed packF3x9_E1x5 exponent packing #614
 
 
 #### [GLM 0.9.8.4](https://github.com/g-truc/glm/releases/tag/0.9.8.4) - 2017-01-22
 #### [GLM 0.9.8.4](https://github.com/g-truc/glm/releases/tag/0.9.8.4) - 2017-01-22
 ##### Fixes:
 ##### Fixes: