1 <?xml version="1.0" encoding="UTF-8"?>
2 <draft href="EXT_color_buffer_half_float/">
3 <name>EXT_color_buffer_half_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="OES_texture_half_float" require="true"/>
23 <mirrors href="http://www.khronos.org/registry/gles/extensions/EXT/EXT_color_buffer_half_float.txt"
24 name="EXT_color_buffer_half_float">
26 <p>All references to <code>R16F</code> and <code>RG16F</code> types
33 <p>The 16-bit floating-point types <code>RGB16F</code> and
34 <code>RGBA16F</code> become available as color-renderable formats.
35 Renderbuffers can be created in these formats. These and textures
36 created with <code>type = HALF_FLOAT_OES</code>, which will have one
37 of these internal formats, can be attached to framebuffer object color
38 attachments for rendering.</p>
42 <p><span style="color: red">NOTE:</span> fragment shaders outputs
43 gl_FragColor and gl_FragData[0] will only be clamped and converted
44 when the color buffer is fixed-point and <code>BlendColor()</code> and
45 <code>ClearColor()</code> will no longer clamp their parameter values
46 on input. Clamping will be applied as necessary at draw time according
47 to the type of color buffer in use.</p>
51 <p>The format and type combination <code>RGBA</code> and
52 <code>FLOAT</code> becomes valid for reading from a floating-point
53 rendering buffer. Note: <code>RGBA</code> and
54 <code>UNSIGNED_BYTE</code> cannot be used for reading from a
55 floating-point rendering buffer.</p>
59 <p>The component types of framebuffer object attachments can be
65 <idl xml:space="preserve">module webgl {
66 interface EXT_color_buffer_half_float {
67 const GLenum RGBA16F_EXT = 0x881A;
68 const GLenum RGB16F_EXT = 0x881B;
69 const GLenum FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT = 0x8211;
70 const GLenum UNSIGNED_NORMALIZED_EXT = 0x8C17;
71 }; // interface EXT_color_buffer_half_float
72 }; // module webgl</idl>
75 <p>In section 5.13.12 <cite>Reading back pixels</cite>, change the allowed
76 format and types table to:</p>
83 <th>frame buffer type</th>
93 <td>normalized fixed-point</td>
95 <td>UNSIGNED_BYTE</td>
99 <td>floating-point</td>
109 <p>Change the paragraph beginning "If <code>pixels</code> is null ..."
110 to</p><blockquote>If frame buffer type is not that indicated in the table for
111 the <code>format</code> and <code>type</code> combination, an
112 INVALID_OPERATON error is generated. If pixels is null
117 <revision date="2012/11/08">
118 <change>Initial revision.</change>
121 <revision date="2012/11/13">
122 <change>"Add reading-pixels-as-FLOAT feature to the Overview and related
123 changes to WebGL section 5.13.12.</change>
126 <revision date="2012/11/26">
127 <change>Move to draft.</change>