Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 53d35a0e04
Fetching contributors…

Cannot retrieve contributors at this time

72 lines (69 sloc) 2.829 kb
<!--AUTOGENERATED FILE - DO NOT EDIT - SEE Makefile--><html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>WebGL EXT_frag_depth Extension Draft Specification</title>
<link rel="alternate" type="text/xml" href="extension.xml">
<link rel="stylesheet" type="text/css" href="../../resources/Khronos-WD.css">
</head>
<body>
<!--begin-logo--><div class="left"><a href="http://webgl.org/"><img alt="WebGL" height="72" src="../../resources/WebGL-Logo.png" width="156"></a></div>
<div class="right"><a href="http://khronos.org/"><img alt="Khronos" height="60" src="../../resources/KhronosGroup-3D.png" width="220"></a></div>
<div style="clear: both;"></div>
<br><!--end-logo--><h1>WebGL EXT_frag_depth Extension Draft Specification</h1>
<h2 class="no-toc">Name</h2>
<p>EXT_frag_depth</p>
<h2 class="no-toc">Contact</h2>
<p> <a href="https://www.khronos.org/webgl/public-mailing-list/">WebGL
working group</a> (public_webgl 'at' khronos.org) </p>
<h2 class="no-toc">Contributors</h2>
<p>Florian Boesch (pyalot 'at' gmail.com)</p>
<p>Members of the WebGL working group</p>
<h2 class="no-toc">Version</h2>
<p> Last modified date: December 17, 2012<br>
Revision: 2</p>
<h2 class="no-toc">Number</h2>
<p> WebGL extension #16</p>
<h2 class="no-toc">Dependencies</h2>
<p> Written against the <a href="http://www.khronos.org/registry/webgl/specs/1.0/">WebGL API 1.0</a> specification. </p>
<h2 class="no-toc">Overview</h2>
<p> This extension exposes the
<a href="http://www.khronos.org/registry/gles/extensions/EXT/EXT_frag_depth.txt">EXT_frag_depth</a> functionality to
WebGL. There are no WebGL-specific behavioral changes.
</p>
<p>
Consult the above extension for documentation, issues and new functions and enumerants.
</p>
<p> When this extension is enabled: </p>
<ul>
<li>
Adds the ability to set the depth value of a fragment from
within the fragment shader with the built-in output variable gl_FragDepthEXT.
</li>
<li>When a <em>fragment</em> shader enables, requires, or warns <code>GL_EXT_frag_depth</code> with an <code>#extension</code> directive:<ul><li>
<code>float gl_FragDepthEXT</code> is a built-in output.
</li></ul>
</li>
<li>
The GLSL macro <code>GL_EXT_frag_depth</code>
is defined as <code>1</code>.
</li>
</ul>
<h2 class="no-toc">IDL</h2>
<p><pre class="idl">
interface EXT_frag_depth {
};
</pre></p>
<h2 class="no-toc">Sample Code</h2>
<pre>
void main(){
gl_FragColor = vec4(1.0, 0.0, 1.0, 1.0);
gl_FragDepthEXT = 0.5;
}
</pre>
<h2 class="no-toc">Revision History</h2>
<p>Revision 1, 2012/11/22</p>
<ul><li>Initial revision.</li></ul>
<p>Revision 2, 2012/12/17</p>
<ul><li>Moved to draft.</li></ul>
</body>
</html>
Jump to Line
Something went wrong with that request. Please try again.