unpackUnorm2x16, unpackUnorm4x8, unpackSnorm4x8 — unpack floating-point values from an unsigned integer
vec2 unpackUnorm2x16(
uint p)
;
vec2 unpackSnorm2x16(
uint p)
;
vec4 unpackUnorm4x8(
uint p)
;
vec4 unpackSnorm4x8(
uint p)
;
unpackUnorm2x16
, unpackSnorm2x16
, unpackUnorm4x8
and unpackSnorm4x8
unpack
single 32-bit unsigned integers, specified in the parameter p
into a pair of 16-bit unsigned integers,
four 8-bit unsigned integers or four 8-bit signed integers. Then, each component is converted to a normalized floating-point
value to generate the returned two- or four-component vector.
The conversion for unpacked fixed point value f to floating-point is performed as follows:
The first component of the returned vector will be extracted from the least significant bits of the input; the last component will be extracted from 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 |
---|---|---|---|---|---|---|---|---|---|---|
unpackUnorm2x16 | - | - | - | - | - | - | - | Y | Y | Y |
unpackSnorm2x16 | - | - | - | - | - | - | - | - | Y | Y |
unpackUnorm4x8 | - | - | - | - | - | - | - | Y | Y | Y |
unpackSnorm4x8 | - | - | - | - | - | - | - | 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/.