floatAsNormalizedIntegerUnquantized(float, bits, signed): number
Encode a JS number into the "normalized" (unorm/snorm) integer scale with bits bits but
remain unquantized. Input must be between -1 and 1 if signed, or 0 and 1 if unsigned.
e.g. float 0.5 -> "unorm8" 127.5
MAINTENANCE_TODO: See if performance of texel_data improves if this function is pre-specialized
for a particular bits/signed.
Encode a JS
number
into the "normalized" (unorm/snorm) integer scale withbits
bits but remain unquantized. Input must be between -1 and 1 if signed, or 0 and 1 if unsigned. e.g. float 0.5 -> "unorm8" 127.5MAINTENANCE_TODO: See if performance of texel_data improves if this function is pre-specialized for a particular
bits
/signed
.