i = int((val / t2) + rcp(precisionMinusOne)); // + rcp(precisionMinusOne) to deal with precision issue (can't use round() as val contain the floating number
f = (-t2 * float(i) + val) / t1;
f = saturate((-t2 * float(i) + val) / t1); // Saturate in case of precision issue
return PackFloatInt(f, i, maxi, 255.0);
return PackFloatInt(f, i, maxi, 256.0);
UnpackFloatInt(val, maxi, 255.0, f, i);
UnpackFloatInt(val, maxi, 256.0, f, i);
}
float PackFloatInt10bit(float f, int i, float maxi)