Function glm::builtin::packSnorm2x16
[−]
[src]
pub fn packSnorm2x16(v: Vec2) -> u32
First, converts each component of the normalized floating-point value v
into 16-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) * 32767.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.