mirror of
https://github.com/ioquake/ioq3.git
synced 2024-11-10 07:11:46 +00:00
OpenGL2: Use signed value in case value goes below 0.
This commit is contained in:
parent
c755d75a5e
commit
3ebc230b28
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue