The WebGL API's EXT_float_blend
extension allows blending and draw buffers with 32-bit floating-point components.
WebGL extensions are available using the WebGLRenderingContext.getExtension()
method. For more information, see also Using Extensions in the WebGL tutorial.
Note: This extension is available to both, WebGL1 and WebGL2 contexts. However, to use it, you need to enable the use of 32-bit floating-point draw buffers by enabling the extension WEBGL_color_buffer_float
(for WebGL1) or EXT_color_buffer_float
(for WebGL2). Doing so automatically enables EXT_float_blend
as well, if and only if EXT_float_blend
is also supported. Support for EXT_color_buffer_float
does not imply support for EXT_float_blend
.
With this extension enabled, calling drawArrays()
or drawElements()
with blending enabled and a draw buffer with 32-bit floating-point components will no longer result in an INVALID_OPERATION
error.