Light | Dark



unpackHalf2x16 — convert two 16-bit floating-point values packed into a single 32-bit integer into a vector of two 32-bit floating-point quantities


vec2 unpackHalf2x16( uint v);



Specify a single 32-bit unsigned integer values that contains two 16-bit floating point values to be unpacked.


unpackHalf2x16 returns a two-component floating-point vector with components obtained by unpacking a 32-bit unsigned integer into a pair of 16-bit values, interpreting those values as 16-bit floating-point numbers according to the OpenGL ES Specification, and converting them to 32-bit floating-point values. The first component of the vector is obtained from the 16 least-significant bits of v; the second component is obtained from the 16 most-significant bits of v.

Version Support

OpenGL ES Shading Language Version
Function Name 1.00 3.00 3.10
unpackHalf2x16 -

See Also


Think you can improve this page? Edit this page on GitHub.