accbc68b7f3b49bd0f6f74cfa3590e13c7aea535
[clinton/guile-figl.git] / upstream-man-pages / manglsl / gl_FragDepth.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook MathML Module V1.1b1//EN"
3 "http://www.oasis-open.org/docbook/xml/mathml/1.1CR1/dbmathml.dtd">
4 <refentry id="gl_FragDepth">
5 <refmeta>
6 <refmetainfo>
7 <copyright>
8 <year>2011</year>
9 <holder>Khronos Group</holder>
10 </copyright>
11 </refmetainfo>
12 <refentrytitle>gl_FragDepth</refentrytitle>
13 <manvolnum>3G</manvolnum>
14 </refmeta>
15 <refnamediv>
16 <refname>gl_FragDepth</refname>
17 <refpurpose>establishes a depth value for the current fragment</refpurpose>
18 </refnamediv>
19 <refsynopsisdiv><title>Declaration</title>
20 <funcsynopsis>
21 <function>out float gl_FragDepth;</function>
22 </funcsynopsis>
23 </refsynopsisdiv>
24 <refsect1 id="description"><title>Description</title>
25 <para>
26 Available only in the fragment language, <function>gl_FragDepth</function> is an output variable
27 that is used to establish the depth value for the current fragment. If depth buffering is enabled
28 and no shader writes to <function>gl_FragDepth</function>, then the fixed function value for
29 depth will be used (this value is contained in the z component of <citerefentry><refentrytitle>gl_FragCoord</refentrytitle></citerefentry>)
30 otherwise, the value written to <function>gl_FragDepth</function> is used.
31 If a shader statically assigns to <function>gl_FragDepth</function>, then the value of the fragment's depth
32 may be undefined for executions of the shader that take that path. That is, if the set of linked fragment
33 shaders statically contain a write to <function>gl_FragDepth</function>, then it is responsible for always
34 writing it.
35 </para>
36 </refsect1>
37 <refsect1 id="versions"><title>Version Support</title>
38 <informaltable frame="topbot">
39 #VARTABLECOLS#
40 <thead>
41 #VARTABLEHEADER#
42 <row>
43 <entry>gl_FragDepth</entry>#newin11#
44 </row>
45 </thead>
46 </tgroup>
47 </informaltable>
48 </refsect1>
49 <refsect1 id="seealso"><title>See Also</title>
50 <para>
51 <citerefentry><refentrytitle>gl_FragCoord</refentrytitle></citerefentry>
52 </para>
53 </refsect1>
54 <refsect1 id="Copyright"><title>Copyright</title>
55 <para>
56 Copyright <trademark class="copyright"></trademark> 2011 Khronos Group.
57 This material may be distributed subject to the terms and conditions set forth in
58 the Open Publication License, v 1.0, 8 June 1999.
59 <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
60 </para>
61 </refsect1>
62 </refentry>