I have just come across this article about half, snorm and unorm, but I don't get some of the points (or why they work).
- According to the article, a
halfis basically a 16 bit float and ansnormis a signedfloatinteger$^1$ dividied by65535. Therefore, they are basically the same, just that the snorm is represented in $[-1, 1]$ whereas the half is in $[-65520; 65520)$ (where did those 32 values go?) but doesn't need another multiplication to get to the "real" value. Now the article says:
Other people prefer 16-bit xNORM variants because they tend to give really good precision and it is evenly distributed.
Why do they give a "good precision" and are "evenly distributed" (as opposed to the half)?
For
snorma division is suggested, by either $64$ or the maximum AABB value. I get the latter, that can be used for more or less any model then, but why use the magic number $64$ if I don't want to calculate it? Is it common to have models that don't exceed this specific value?If I get good precision with
half(orxnormrespectively) to save bandwidth, but in my application actually need really large position values, can I leverage the better precision ofxnormwith a multiplication for "full"floatand save myself from usingdoublevariables?
$^1$ Edit for future readers. I wrongly assumed it was a float.