• 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.

    Parameters

    • float: number
    • bits: number
    • signed: boolean

    Returns number

Generated using TypeDoc