As far as I know, not a single iOS device supports floating-point texture rendering (as well as most mobile devices currently 3/2015)
My understanding of the WebGL specification is
OES_texture_float : Allows you to create and read from 32-bit floating textures, but floating point rendering is device dependent.
OES_texture_float_linear : Allows linear filtering of floating point textures. If this does not exist and OES_texture_float does, you can use gl.NEAREST for floating point textures.
OES_texture_half_float and OES_texture_half_float_linear are the same as above, except for the half float texture.
The traditional way to view floating point texture in WebGL, assuming OES_texture_float exists, is to create a framebuffer, attach a floating point texture to it, and then call gl.checkFramebufferStatus . If it returns gl.FRAMEBUFFER_COMPLETE , then you can, if not, then you cannot. Note. This method should work regardless of the next paragraph.
The specification has been updated so you can also check out WebGL extensions to see if floating point texture can be rendered. It is assumed that the WEBGL_color_buffer_float extension tells you that you can display floating point textures. The EXT_color_buffer_half_float extension EXT_color_buffer_half_float same for a half-float texture. I don't know a browser that actually shows these extensions, although they support floating point rendering if the hardware supports it.
For example, my 2012 Retina MBP in Chrome reports 41
gl = document.createElement("canvas").getContext("webgl").getSupportedExtensions() ["ANGLE_instanced_arrays", "EXT_blend_minmax", "EXT_frag_depth", "EXT_shader_texture_lod", "EXT_sRGB", "EXT_texture_filter_anisotropic", "WEBKIT_EXT_texture_filter_anisotropic", "OES_element_index_uint", "OES_standard_derivatives", "OES_texture_float", "OES_texture_float_linear", "OES_texture_half_float", "OES_texture_half_float_linear", "OES_vertex_array_object", "WEBGL_compressed_texture_s3tc", "WEBKIT_WEBGL_compressed_texture_s3tc", "WEBGL_debug_renderer_info", "WEBGL_debug_shaders", "WEBGL_depth_texture", "WEBKIT_WEBGL_depth_texture", "WEBGL_lose_context", "WEBKIT_WEBGL_lose_context"]
Firefox Reports 36
gl = document.createElement("canvas").getContext("webgl").getSupportedExtensions().join("\n") "ANGLE_instanced_arrays EXT_blend_minmax EXT_frag_depth EXT_sRGB EXT_texture_filter_anisotropic OES_element_index_uint OES_standard_derivatives OES_texture_float OES_texture_float_linear OES_texture_half_float OES_texture_half_float_linear OES_vertex_array_object WEBGL_compressed_texture_s3tc WEBGL_depth_texture WEBGL_draw_buffers WEBGL_lose_context MOZ_WEBGL_lose_context MOZ_WEBGL_compressed_texture_s3tc MOZ_WEBGL_depth_texture"
Browser vendors are busy implementing WebGL 2.0 and there is no pressure to use the gl.checkFramebufferStatus method to spend time creating other extension strings.
Apparently, some iOS devices support EXT_color_buffer_half_float , so you can try creating half of the floating texture, attach it to the framebuffer and check its status, and then see if this works.
Here is a sample for checking support. By running it on iPadAir2 and my iPhone5, I get
can make floating point textures can linear filter floating point textures can make half floating point textures can linear filter floating point textures can **NOT** render to FLOAT texture successfully rendered to HALF_FLOAT_OES texture
as we expected.
"use strict"; function log(msg) { var div = document.createElement("div"); div.appendChild(document.createTextNode(msg)); document.body.appendChild(div); } function glEnum(gl, v) { for (var key in gl) { if (gl[key] === v) { return key; } } return "0x" + v.toString(16); } window.onload = function() {
canvas { border: 1px solid black; }
<script src="//webglfundamentals.org/webgl/resources/webgl-utils.js"></script> <canvas id="c" width="16" height="16"></canvas> <script id="2d-vertex-shader" type="x-shader/x-vertex"> attribute vec4 a_position; void main() { gl_Position = a_position; } </script> <script id="2d-fragment-shader" type="x-shader/x-fragment"> precision mediump float; uniform vec4 u_color; uniform sampler2D u_texture; void main() { gl_FragColor = texture2D(u_texture, vec2(0.5, 0.5)) * u_color; } </script>