OpenGL2: Use signed value in case value goes below 0.
This commit is contained in:
1 parent
c755d75a5e
commit
3ebc230b28
1 file changed
+1
-1
@@ -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;
|
||||
|
||||
|
||||
Reference in new issue
Block a user