AttributeCompression
Attribute compression and decompression functions.
See also
Functions
Pack texture coordinates into a single float. The texture coordinates will only preserve 12 bits of precision.
Decode RGB565-encoded colors into a floating point typed array containing normalized RGB values.
Decodes RGB values at 8-bit precision from a signle float, equivalent to 0xFFFFFF representation in JavaScript. Perceptually near-lossless in the "srgb" color space; "srgb-linear" and wide-gamut color spaces benefit from 10+ bit precision.
Decompresses texture coordinates that were packed into a single float.
Dequantizes a quantized typed array into a floating point typed array.
Encodes RGB values at 8-bit precision into a single float, equivalent to 0xFFFFFF representation in JavaScript. Perceptually near-lossless in the "srgb" color space; "srgb-linear" and wide-gamut color spaces benefit from 10+ bit precision.
Decodes a unit-length vector in 2 byte 'oct' encoding to a normalized 3-component vector.
Decodes a unit-length vector in 'oct' encoding packed in a floating-point number to a normalized 3-component vector.
Decodes a unit-length vector in 4 byte 'oct' encoding to a normalized 3-component vector.
Decodes a unit-length vector in 'oct' encoding to a normalized 3-component vector.
Encodes a normalized vector into 2 SNORM values in the range of 0-255 following the 'oct' encoding.
Encodes a normalized vector into 2 SNORM values in the range of 0-255 following the 'oct' encoding and stores those values in a single float-point number.
Encodes a normalized vector into 2 SNORM values in the range of 0-rangeMax following the 'oct' encoding.
Encodes three normalized vectors into 6 SNORM values in the range of 0-255 following the 'oct' encoding and packs those into two floating-point numbers.
Packs an oct encoded vector into a single floating-point number.
Decodes three unit-length vectors in 'oct' encoding packed into a floating-point number to a normalized 3-component vector.
Decodes delta and ZigZag encoded vertices. This modifies the buffers in place.