1 <?xml version="1.0" encoding="UTF-8"?>
2 <draft href="WEBGL_color_buffer_float/">
3 <name>WEBGL_color_buffer_float</name>
5 <contact><a href="https://www.khronos.org/webgl/public-mailing-list">WebGL
6 working group</a> (public_webgl 'at' khronos.org) </contact>
9 <contributor>Mark Callow, HI Corporation</contributor>
11 <contributor>Members of the WebGL working group</contributor>
19 <ext name="EXT_color_buffer_half_float"/>
21 <ext name="OES_texture_float" require="true"/>
25 <p>Adds support for rendering to 32-bit floating-point color buffers.</p>
29 <p>The 32-bit floating-point types <code>RGB32F</code> and
30 <code>RGBA32F</code> become available as color-renderable formats.
31 Renderbuffers can be created in these formats. These and textures
32 created with <code>type = FLOAT</code>, which will have one of these
33 internal formats, can be attached to framebuffer object color
34 attachments for rendering.</p>
38 <p><span style="color: red">NOTE:</span> fragment shaders outputs
39 gl_FragColor and gl_FragData[0] will only be clamped and converted
40 when the color buffer is fixed-point and <code>BlendColor()</code> and
41 <code>ClearColor()</code> will no longer clamp their parameter values
42 on input. Clamping will be applied as necessary at draw time according
43 to the type of color buffer in use.</p>
47 <p>The format and type combination <code>RGBA</code> and
48 <code>FLOAT</code> becomes valid for reading from a floating-point
49 rendering buffer. Note: <code>RGBA</code> and
50 <code>UNSIGNED_BYTE</code> cannot be used for reading from a
51 floating-point rendering buffer.</p>
55 <p>The component types of framebuffer object attachments can be
61 <idl xml:space="preserve">
63 interface EXT_color_buffer_float {
64 const GLenum RGBA32F_EXT = 0x8814;
65 const GLenum RGB32F_EXT = 0x8815;
66 const GLenum FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT = 0x8211;
67 const GLenum UNSIGNED_NORMALIZED_EXT = 0x8C17;
68 }; // interface EXT_color_buffer_float
72 <function name="renderbufferStorage" type="void"><param name="target"
73 type="GLenum"/><param name="internalformat" type="GLenum"/><param
74 name="width" type="GLsizei"/><param name="height"
75 type="GLsizei"/><code>RGBA32F_EXT</code> and <code>RGB32F_EXT</code> are
76 accepted as the <code>internalformat</code> parameter of
77 <code>renderbufferStorage()</code>.</function>
81 <p>The new tokens and the behavioral changes for floating-point color
82 buffers specified in <a
83 href="http://www.khronos.org/registry/webgl/extensions/EXT_color_buffer_half_float/">EXT_color_buffer_half_float</a>
84 are incorporated into WebGL except for the <code>RGB16F</code> and
85 <code>RGBA16F</code> types. All references to these are replaced by the
86 32-bit floating-point types specified above.</p>
90 <revision date="2012/11/08">
91 <change>Initial revision.</change>
94 <revision date="2012/11/12">
95 <change>Don't mirror EXT_color_buffer_half_float. Mirror has a different
96 meaning from what is done here.</change>
99 <revision date="2012/11/13">
100 <change>Add reading-pixels-as-FLOAT feature to the Overview.</change>
103 <revision date="2012/11/26">
104 <change>Move to draft.</change>
107 <revision date="2014/07/15">
108 <change>Removed webgl module. Added NoInterfaceObject extended attribute.</change>