GL_OES_texture_float#
Supported Hardware#
Series5, Series5XT, Series6, Series6XE, Series6XT (ES2/3 Only)
Valid APIs#
OpenGL ES 1.x, 2.0
Description#
This extension adds the ability to use 32-bit floating point type (GL_FLOAT) representations of texture data as a readable texture format when shading an object. This extension does not add linear sampling from this texture type however due to the high cost of such an operation, which is instead enabled by GL_OES_texture_float_linear. This extension also does not allow these textures to be used as a colour attachment for a framebuffer.
The float data format allows greater range than an integer representation would and is typically used for High Dynamic Range (HDR) colour data.
Note#
This functionality is core to OpenGL ES 3.0.
Registry Link#
http://www.khronos.org/registry/gles/extensions/OES/OES_texture_float.txt
Example#
// Create a floating-point texture
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 1024, 1024, 0, GL_RGBA, GL_FLOAT, pixelData);
// Only nearest filtering is supported for these textures for this extension. Linear filtering
// is enabled by separate extensions.
glTexParameter(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST_MIPMAP_NEAREST);
glTexParameter(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);