WebGL extension support in browsers

It might be something as simple as the dumb parameter that I have in Chrome or Firefox, but I just don't know where to turn if it is, or if it is something else.

The main thing I'm trying to understand is why extension support is so different between browsers.

For example, going to http://prideout.net/recipes/ExtensionViewer.html

For Firefox, I get

OES_texture_float (google) (registry) OES_standard_derivatives (google) (registry) EXT_texture_filter_anisotropic (google) (registry) MOZ_WEBGL_lose_context (google) (registry) WEBGL_lose_context (google) (registry) MOZ_WEBGL_compressed_texture_s3tc (google) (registry) WEBGL_compressed_texture_s3tc (google) (registry) 

But in Chrome I get:

 OES_standard_derivatives (google) (registry) WEBKIT_EXT_texture_filter_anisotropic (google) (registry) OES_vertex_array_object (google) (registry) OES_element_index_uint (google) (registry) WEBGL_lose_context (google) (registry) 

Note the missing OES_texture_float

At some point, I noticed that I (or have) have a floating point extension related to AMD, but I don’t know which page showed me what I have. I have the feeling that all that was shown is the old version of Chrome.

I know that my map supports floating point textures (at least to some extent), and whenever I go to pages that require floating point textures in Firefox, the demo works great.

If anything that I'm trying to figure out is what I have to do to make floating-point textures work in Chrome on my machine. Some of the coolest things you can do with WebGL require the use of a floating point texture extension.

What errors are supposedly used by both Firefox and Chrome, use ANGLE, so that both support will not support the same extensions?

+4
source share
3 answers

Read from the WebGL best practices page on MDN:

  • Failure from a floating point texture may not be supported, even if the OES_texture_float extension is supported. This usually fails on current mobile equipment. To check if this is supported, you have to call the WebGL check function checkFramebufferStatus ().

As for the hardware problem, it should work, at least on modern dedicated graphics cards, but you will need some workarounds or abandoning the use of "weak" devices, such as tablets and phones.

+2
source

For a list of supported extensions on your platform, use

 var extensions = gl.getSupportedExtensions(); 

Returns an array of strings. This array depends on many factors:

  • hardware and driver do you have
  • browser (Firefox / Chrome / Other)
  • version of your browser
  • version of the WebGL context you requested (currently 1 or 2)

On the 2015 mac book pro with Intel Iris Graphics 6100, I have it today (05/16/2017)

26 extends WebGL 1.0 extensions, from Chrome:

 [ 'ANGLE_instanced_arrays', 'EXT_blend_minmax', 'EXT_disjoint_timer_query', '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_compressed_texture_s3tc_srgb', 'WEBKIT_WEBGL_compressed_texture_s3tc_srgb', 'WEBGL_debug_renderer_info', 'WEBGL_debug_shaders', 'WEBGL_depth_texture', 'WEBGL_draw_buffers', 'WEBGL_lose_context', 'WEBKIT_WEBGL_lose_context' ] 

23 distributes WebGL 1.0 extensions from Firefox:

 [ 'ANGLE_instanced_arrays', 'EXT_blend_minmax', 'EXT_color_buffer_half_float', 'EXT_frag_depth', 'EXT_sRGB', 'EXT_shader_texture_lod', '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_color_buffer_float', 'WEBGL_compressed_texture_s3tc', 'WEBGL_debug_renderer_info', 'WEBGL_depth_texture', 'WEBGL_draw_buffers', 'WEBGL_lose_context', 'MOZ_WEBGL_lose_context', 'MOZ_WEBGL_compressed_texture_s3tc', 'MOZ_WEBGL_depth_texture' ] 

10 WebGL 2.0 extension extensions from Chrome:

 [ 'EXT_color_buffer_float', 'EXT_disjoint_timer_query_webgl2', 'EXT_texture_filter_anisotropic', 'OES_texture_float_linear', 'WEBGL_compressed_texture_s3tc', 'WEBGL_compressed_texture_s3tc_srgb', 'WEBGL_debug_renderer_info', 'WEBGL_debug_shaders', 'WEBGL_get_buffer_sub_data_async', 'WEBGL_lose_context' ] 

8 extends WebGL 2.0 extensions from Firefox:

 [ 'EXT_color_buffer_float', 'EXT_texture_filter_anisotropic', 'EXT_disjoint_timer_query', 'OES_texture_float_linear', 'WEBGL_compressed_texture_s3tc', 'WEBGL_lose_context', 'MOZ_WEBGL_lose_context', 'MOZ_WEBGL_compressed_texture_s3tc' ] 

For more useful information you can check the MDN .

Here you can find a pretty handy tool to check your browser on the Internet.

You can find worldwide statistics on webgl extension support here .

Please check to get information on advanced extensions in WebGL2.

+2
source

I had to save the version information of Chrome that I used at that time. Starting from 2013-08-14 (and maybe some time earlier) Chrome on this machine

 Browser: 5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.95 Safari/537.36 Platform: Win32 

now supports floating point textures. http://prideout.net/recipes/ExtensionViewer.html gives the following:

 WEBKIT_EXT_texture_filter_anisotropic (google) (registry) OES_element_index_uint (google) (registry) OES_standard_derivatives (google) (registry) OES_texture_float (google) (registry) OES_vertex_array_object (google) (registry) WEBKIT_WEBGL_compressed_texture_s3tc (google) (registry) WEBKIT_WEBGL_depth_texture (google) (registry) WEBGL_lose_context (google) (registry) 

This still doesn't explain why there is a difference between Firefox and Chrome, although as far as I know, these were just different versions of the ANGLE libraries.

+1
source

Source: https://habr.com/ru/post/1489781/


All Articles