Graphics Reference
In-Depth Information
Table B-4
Floating-Point Pack and Unpack Functions (continued)
Syntax
Description
The conversion for unpacked fixed-
point value f to floating point is done
as follows:
unpackUnorm2x16: f /65535.0
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.
highp uint packHalf2x16
(mediumpvec2 v )
Returns an unsigned integer obtained
by converting the components of a
two-component floating-point vector to
the 16-bit floating-point representation
found in the OpenGL ES Specification,
and then packing these two 16-bit
integers into a 32-bit unsigned integer.
The first vector component specifies
the 16 least significant bits of the
result; the second component specifies
the 16 most significant bits.
mediump vec2 unpackHalf2x16
(highp uint v )
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 .
Geometric Functions
Geometric functions operate on vectors as vectors, not component-wise.
Table B-5 describes these functions.
 
 
 
Search WWH ::




Custom Search