Graphics Reference
In-Depth Information
Floating-Point Texture Formats
OpenGL ES 3.0 also introduces floating-point texture formats. The
majority of the floating-point formats are backed by either 16-bit
half-floating-point data (described in detail in Appendix A) or 32-bit
floating-point data. Floating-point texture formats can have one to four
components, just like normalized texture formats (R, RG, RGB, RGBA).
OpenGL ES 3.0 does not mandate that floating-point formats be used as
render targets, and only 16-bit half-floating-point data is mandated to be
filterable.
In addition to 16-bit and 32-bit floating-point data, OpenGL ES 3.0
introduces the 11/11/10 GL_R11F_G11F_B10F floating-point format. The
motivation for this format is to provide higher-precision, three-channel
textures while still keeping the storage of each texel at 32 bits. The use of
this format may lead to higher performance than a 16/16/16 GL_RGB16F
or 32/32/32 GL_RGB32F texture. This format has 11 bits for the Red and
Green channel and 10 bits for the Blue channel. For the 11-bit Red and
Green values, there are 6 bits of mantissa and 5 bits of exponent; the
10-bit Blue value has 5 bits of mantissa and 5 bits of exponent. The
11/11/10 format can be used only to represent positive values because
there is no sign bit for any of the components. The largest value that
can be represented in the 11-bit and 10-bit formats is 6.5 × 10 4 and the
smallest value is 6.1 × 10 −5 . The 11-bit format has 2.5 decimal digits of
precision, and the 10-bit format has 2.32 decimal digits of precision.
Table 9-6
Valid Sized Floating-Point Internal Format Combinations for glTexImage2D
internalFormat
format
type
Input Data
R
F
GL_R16F
GL_RED
GL_HALF_FLOAT 16-bit Red (half-float)
X
GL_R16F
GL_RED
GL_FLOAT
32-bit Red (float)
X
GL_R32F
GL_RED
GL_FLOAT
32-bit Red (float)
GL_RG16F
GL_RG
GL_HALF_FLOAT 16/16 RG (half-float)
X
GL_RG16F
GL_RG
GL_FLOAT
32/32 RG (float)
X
GL_RG32F
GL_RG
GL_FLOAT
32/32 RG (float)
GL_RGB16F
GL_RGB
GL_HALF_FLOAT 16/16/16 RGB (half-
float)
X
(continues)
 
 
Search WWH ::




Custom Search