Function glm::builtin::packSnorm4x8
[−]
[src]
pub fn packSnorm4x8(v: Vec4) -> u32
First, converts each component of the normalized floating-point value v
into 8-bit integer values. Then, the results are packed into the
returned 32-bit unsigned integer.
The conversion for component c
of v
to fixed point is done as follows:
round(clamp(c, -1, 1) * 127.0)
The first component of the vector will be written to the least significant bits of the output; the last component will be written to the most significant bits.