EXT_color_buffer_half_float
WebGL working group (public_webgl 'at' khronos.org)
Mark Callow, HI Corporation
Members of the WebGL working group
Last modified date: November 26, 2012
Revision: 3
WebGL extension #14
Written against the WebGL API 1.0 specification.
Implementations must also support the OES_texture_half_float extension.
This extension exposes the EXT_color_buffer_half_float functionality to WebGL.
The following WebGL-specific behavioral changes apply:
All references to R16F and RG16F types
are ignored.
Consult the above extension for documentation, issues and new functions and enumerants.
When this extension is enabled:
The 16-bit floating-point types RGB16F and
RGBA16F become available as color-renderable formats.
Renderbuffers can be created in these formats. These and textures
created with type = HALF_FLOAT_OES, which will have one
of these internal formats, can be attached to framebuffer object color
attachments for rendering.
NOTE: fragment shaders outputs
gl_FragColor and gl_FragData[0] will only be clamped and converted
when the color buffer is fixed-point and BlendColor() and
ClearColor() will no longer clamp their parameter values
on input. Clamping will be applied as necessary at draw time according
to the type of color buffer in use.
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.
module webgl {
interface EXT_color_buffer_half_float {
const GLenum RGBA16F_EXT = 0x881A;
const GLenum RGB16F_EXT = 0x881B;
const GLenum FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT = 0x8211;
const GLenum UNSIGNED_NORMALIZED_EXT = 0x8C17;
}; // interface EXT_color_buffer_half_float
}; // module webglIn section 5.13.12 Reading back pixels, change the allowed format and types table to:
| frame buffer type |
format
|
type
|
|---|---|---|
| normalized fixed-point | RGBA | UNSIGNED_BYTE |
| floating-point | RGBA | FLOAT |
Change the paragraph beginning "If pixels is null ..."
to
If frame buffer type is not that indicated in the table for theformatandtypecombination, an INVALID_OPERATON error is generated. If pixels is null ...
Revision 1, 2012/11/08
Revision 2, 2012/11/13
Revision 3, 2012/11/26