OpenGL2: Use signed value in case value goes below 0.

This commit is contained in:
SmileTheory 2015-04-06 03:05:28 -07:00
parent c755d75a5e
commit 3ebc230b28
1 changed files with 1 additions and 1 deletions

View File

@ -225,7 +225,7 @@ uint16_t FloatToHalf(float in)
f32.f = in;
f16.pack.exponent = CLAMP(f32.pack.exponent - 112, 0, 31);
f16.pack.exponent = CLAMP((int)(f32.pack.exponent) - 112, 0, 31);
f16.pack.fraction = f32.pack.fraction >> 13;
f16.pack.sign = f32.pack.sign;