| 1 |
<?xml version="1.0" encoding="UTF-8"?> |
| 2 |
<ratified href="EXT_frag_depth/"> |
| 3 |
<name>EXT_frag_depth</name> |
| 4 |
<contact> <a href="https://www.khronos.org/webgl/public-mailing-list/">WebGL |
| 5 |
working group</a> (public_webgl 'at' khronos.org) </contact> |
| 6 |
|
| 7 |
<contributors> |
| 8 |
<contributor>Florian Boesch (pyalot 'at' gmail.com)</contributor> |
| 9 |
<contributor>Members of the WebGL working group</contributor> |
| 10 |
</contributors> |
| 11 |
|
| 12 |
<number>16</number> |
| 13 |
|
| 14 |
<depends> |
| 15 |
<api version="1.0"/> |
| 16 |
<core version="2.0"> |
| 17 |
<glsl version="300 es"/> |
| 18 |
</core> |
| 19 |
</depends> |
| 20 |
|
| 21 |
<overview> |
| 22 |
<mirrors href="http://www.khronos.org/registry/gles/extensions/EXT/EXT_frag_depth.txt" |
| 23 |
name="EXT_frag_depth"> |
| 24 |
</mirrors> |
| 25 |
|
| 26 |
<features> |
| 27 |
<feature> |
| 28 |
Adds the ability to set the depth value of a fragment from |
| 29 |
within the fragment shader with the built-in output variable gl_FragDepthEXT. |
| 30 |
</feature> |
| 31 |
<glsl extname="GL_EXT_frag_depth"> |
| 32 |
<stage type="fragment"/> |
| 33 |
<output name="gl_FragDepthEXT" type="float" /> |
| 34 |
</glsl> |
| 35 |
</features> |
| 36 |
</overview> |
| 37 |
|
| 38 |
<idl xml:space="preserve"> |
| 39 |
[NoInterfaceObject] |
| 40 |
interface EXT_frag_depth { |
| 41 |
}; |
| 42 |
</idl> |
| 43 |
|
| 44 |
<samplecode xml:space="preserve"> |
| 45 |
<pre> |
| 46 |
void main(){ |
| 47 |
gl_FragColor = vec4(1.0, 0.0, 1.0, 1.0); |
| 48 |
gl_FragDepthEXT = 0.5; |
| 49 |
} |
| 50 |
</pre> |
| 51 |
</samplecode> |
| 52 |
|
| 53 |
<history> |
| 54 |
<revision date="2012/11/22"> |
| 55 |
<change>Initial revision.</change> |
| 56 |
</revision> |
| 57 |
<revision date="2012/12/17"> |
| 58 |
<change>Moved to draft.</change> |
| 59 |
</revision> |
| 60 |
<revision date="2014/05/13"> |
| 61 |
<change>Moved to community approved.</change> |
| 62 |
</revision> |
| 63 |
<revision date="2014/07/15"> |
| 64 |
<change>Added NoInterfaceObject extended attribute.</change> |
| 65 |
</revision> |
| 66 |
<revision date="2015/05/29"> |
| 67 |
<change>Ratified by Khronos Board of Promoters.</change> |
| 68 |
</revision> |
| 69 |
</history> |
| 70 |
</ratified> |