Skip to content


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">
<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">
<!--begin-logo--><div class="left"><a href=""><img alt="WebGL" height="72" src="../../resources/WebGL-Logo.png" width="156"></a></div>
<div class="right"><a href=""><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>
<h2 class="no-toc">Contact</h2>
<p> <a href="">WebGL
working group</a> (public_webgl 'at' </p>
<h2 class="no-toc">Contributors</h2>
<p>Florian Boesch (pyalot 'at'</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="">WebGL API 1.0</a> specification. </p>
<h2 class="no-toc">Overview</h2>
<p> This extension exposes the
<a href="">EXT_frag_depth</a> functionality to
WebGL. There are no WebGL-specific behavioral changes.
Consult the above extension for documentation, issues and new functions and enumerants.
<p> When this extension is enabled: </p>
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>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.
The GLSL macro <code>GL_EXT_frag_depth</code>
is defined as <code>1</code>.
<h2 class="no-toc">IDL</h2>
<p><pre class="idl">
interface EXT_frag_depth {
<h2 class="no-toc">Sample Code</h2>
void main(){
gl_FragColor = vec4(1.0, 0.0, 1.0, 1.0);
gl_FragDepthEXT = 0.5;
<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>
Jump to Line
Something went wrong with that request. Please try again.