WEBGL_color_buffer_float
WebGL working group (public_webgl 'at' khronos.org)
Mark Callow, HI Corporation
Members of the WebGL working group
Last modified date: December 02, 2022
Revision: 11
WebGL extension #15
Written against the WebGL API 1.0 specification.
Written against the EXT_color_buffer_half_float specification.
Implementations must also support the OES_texture_float extension.
No longer available as of the WebGL API 2.0 specification. Subsumed by the EXT_color_buffer_float extension.
Adds support for rendering to 32-bit floating-point color buffers.
When this extension is enabled:
The 32-bit floating-point type RGBA32F
becomes available
as a color-renderable format. Renderbuffers can be created in this
format. These and textures created with format = RGBA
and
type = FLOAT
as specified in OES_texture_float,
can be attached to framebuffer object color attachments for rendering.
The 32-bit floating-point type RGB32F
may also optionally
become available as a color-renderable format. These and textures created
with format = RGB
and type = FLOAT
as specified in
OES_texture_float,
can be attached to framebuffer object color attachments for rendering.
Applications must check framebuffer completeness to determine if an
implementation actually supports this format.
NOTE: fragment shaders outputs
gl_FragColor
and gl_FragData[0]
will only be
clamped and converted when the color buffer is fixed-point and
clearColor()
will no longer clamp its parameter values
on input. Clamping will be applied as necessary at draw time according
to the type of color buffer in use.
If the implementation supports unclamped blend color, the
blendColor()
will no longer clamp its parameter values on
input. Clamping will be applied as necessary at draw time according to
the type of color buffer in use. Applications may check the effective
blend color with getParameter
.
The format and type combination RGBA
and
FLOAT
becomes valid for reading from a floating-point
rendering buffer. Note: RGBA
and
UNSIGNED_BYTE
cannot be used for reading from a
floating-point rendering buffer.
The component types of framebuffer object attachments can be queried.
[Exposed=(Window,Worker), LegacyNoInterfaceObject] interface WEBGL_color_buffer_float { const GLenum RGBA32F_EXT = 0x8814; const GLenum FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT = 0x8211; const GLenum UNSIGNED_NORMALIZED_EXT = 0x8C17; }; // interface WEBGL_color_buffer_float
RGBA32F_EXT
is accepted as the internalformat
parameter.
FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT
is accepted as the pname
parameter.
An INVALID_OPERATION
error is generated if
attachment
is DEPTH_STENCIL_ATTACHMENT
and pname
is FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT
.
The new tokens and the behavioral changes for floating-point color
buffers specified in EXT_color_buffer_half_float
are incorporated into WebGL except for the RGB16F
and
RGBA16F
types. References to RGB16F
are ignored,
and references to RGBA16F
are replaced by references to
RGBA32F
.
Revision 1, 2012/11/08
Revision 2, 2012/11/12
Revision 3, 2012/11/13
Revision 4, 2012/11/26
Revision 5, 2014/07/15
Revision 6, 2014/09/11
Revision 7, 2014/11/24
Revision 8, 2014/11/24
Revision 9, 2016/05/05
Revision 10, 2017/09/14
Revision 11, 2022/12/02