packUnorm — pack floating-point values into an unsigned integer
uint packUnorm2x16(
vec2 v)
;
uint packSnorm2x16(
vec2 v)
;
uint packUnorm4x8(
vec4 v)
;
uint packSnorm4x8(
vec4 v)
;
packUnorm2x16
, packSnorm2x16
, packUnorm4x8
and packSnorm4x8
convert
each component of the normalized floating-ponit value v
into 8- or 16-bit integer
values and then packs the results into a 32-bit unsigned intgeter.
The conversion for component c
of v
to fixed-point is
performed as follows:
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.
Function | Version 1.10 | Version 1.20 | Version 1.30 | Version 1.40 | Version 1.50 | Version 3.30 | Version 4.00 | Version 4.10 | Version 4.20 | Version 4.30 |
---|---|---|---|---|---|---|---|---|---|---|
packUnorm2x16 | - | - | - | - | - | - | - | Y | Y | Y |
packSnorm2x16 | - | - | - | - | - | - | - | - | Y | Y |
packUnorm4x8 | - | - | - | - | - | - | - | Y | Y | Y |
packSnorm4x8 | - | - | - | - | - | - | - | Y | Y | Y |
Copyright © 2011 Khronos Group. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1.0, 8 June 1999. http://opencontent.org/openpub/.