Graphics Reference
In-Depth Information
Table 9-6
Valid Sized Floating-Point Internal Format Combinations for glTexImage2D
(continued)
internalFormat
format
type
Input Data
R
F
GL_RGB16F
GL_RG
GL_FLOAT
16/16 RGB (float)
X
GL_RGB32F
GL_RG
GL_FLOAT
32/32/32 RGB (float)
GL_R11F_G11F_B10F GL_RGB
GL_UNSIGNED_
INT_10F_11F_
11F_REV
10/11/11 (float)
X
GL_R11F_G11F_B10F GL_RGB
GL_HALF_FLOAT 16/16/16 RGB (half-
(float)
X
GL_R11F_G11F_B10F GL_RGB
GL_FLOAT
32/32/32 RGB (half
(float)
X
GL_RGBA16F
GL_RGBA
GL_HALF_FLOAT 16/16/16/16 RGBA
(half-float)
X
GL_RGBA16F
GL_RGBA
GL_FLOAT
32/32/32/32 RGBA
(float)
X
GL_RGBA32F
GL_RGBA
GL_FLOAT
32/32/32/32 RGBA
(float)
Integer Texture Formats
Integer texture formats allow the specification of textures that can
be fetched as integers in the fragment shader. That is, as opposed to
normalized texture formats where the data are converted from their
integer representation to a normalized floating-point value upon fetch
in the fragment shader, the values in integer textures remain as integers
when fetched in the fragment shader.
Integer texture formats are not filterable, but the R, RG, and RGBA
variants can be used as a color attachment to render to in a framebuffer
object. When using an integer texture as a color attachment, the alpha
blend state is ignored (no blending is possible with integer render targets).
The fragment shader used to fetch from integer textures and to output to
an integer render target should use the appropriate signed or unsigned
integer type that corresponds with the format.
 
 
Search WWH ::




Custom Search