rename upstream-man-pages to upstream-doc
[clinton/guile-figl.git] / upstream-doc / manglsl / gl_SampleMask.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_SampleMask">
5 <refmeta>
6 <refmetainfo>
7 <copyright>
8 <year>2011</year>
9 <holder>Khronos Group</holder>
10 </copyright>
11 </refmetainfo>
12 <refentrytitle>gl_SampleMask</refentrytitle>
13 <manvolnum>3G</manvolnum>
14 </refmeta>
15 <refnamediv>
16 <refname>gl_SampleMask</refname>
17 <refpurpose>specifies the sample coverage mask for the current fragment</refpurpose>
18 </refnamediv>
19 <refsynopsisdiv><title>Declaration</title>
20 <funcsynopsis>
21 <function>out int gl_SampleMask[];</function>
22 </funcsynopsis>
23 </refsynopsisdiv>
24 <refsect1 id="description"><title>Description</title>
25 <para>
26 <function>gl_SampleMask</function> is a fragment language output array that may be
27 used to set the sample mask for the fragment being processed. Coverage for the current
28 fragment will become the logical AND of the coverage mask and the output <function>gl_SampleMask</function>.
29 That is, setting a bit in <function>gl_SampleMask</function> to zero will cause the
30 corresponding sample to be considered uncovered for the purposes of multisample fragment operations. However,
31 setting sample mask bits back to one will never enable samples not covered by the original primitive.
32 Bit <emphasis>B</emphasis> of mask <function>gl_SampleMask[M]</function> corresponds to sample
33 32 * <emphasis>M</emphasis> + <emphasis>B</emphasis>. This array must be sized in the fragment shader
34 either implicitly or explicitly to be the same size as the implementation-dependent maximum
35 sample-mask (as an array of 32-bit elements), determined by the maximum number of samples.
36 If the fragment shader statically assigns a value to <function>gl_SampleMask</function>, the
37 sample mask will be undefined for any array elements of any fragment shader invocation that
38 fails to assign a value. If a shader does not statically assign a value to <function>gl_SampleMask</function>,
39 the sample mask has no effect on the processing of a fragment.
40 If the fragment shader is being evaluated at any frequency other than per-fragment, bits within
41 the sample mask not corresponding to the current fragment shader invocation are ignored.
42 </para>
43 </refsect1>
44 <refsect1 id="versions"><title>Version Support</title>
45 <informaltable frame="topbot">
46 <tgroup cols="10" align="left">
47 <colspec colwidth="1.1*" />
48 <colspec colwidth="1*" align="center" />
49 <colspec colwidth="1*" align="center" />
50 <colspec colwidth="1*" align="center" />
51 <colspec colwidth="1*" align="center" />
52 <colspec colwidth="1*" align="center" />
53 <colspec colwidth="1*" align="center" />
54 <colspec colwidth="1*" align="center" />
55 <colspec colwidth="1*" align="center" />
56 <colspec colwidth="1*" align="center" />
57 <thead>
58 <row>
59 <entry rowsep="1" align="left"><emphasis role="bold">
60 Variable
61 </emphasis></entry>
62 <entry rowsep="1" align="left"><emphasis role="bold">
63 Version 1.10
64 </emphasis></entry>
65 <entry rowsep="1" align="left"><emphasis role="bold">
66 Version 1.20
67 </emphasis></entry>
68 <entry rowsep="1" align="left"><emphasis role="bold">
69 Version 1.30
70 </emphasis></entry>
71 <entry rowsep="1" align="left"><emphasis role="bold">
72 Version 1.40
73 </emphasis></entry>
74 <entry rowsep="1" align="left"><emphasis role="bold">
75 Version 1.50
76 </emphasis></entry>
77 <entry rowsep="1" align="left"><emphasis role="bold">
78 Version 3.30
79 </emphasis></entry>
80 <entry rowsep="1" align="left"><emphasis role="bold">
81 Version 4.00
82 </emphasis></entry>
83 <entry rowsep="1" align="left"><emphasis role="bold">
84 Version 4.10
85 </emphasis></entry>
86 <entry rowsep="1" align="left"><emphasis role="bold">
87 Version 4.20
88 </emphasis></entry>
89 </row>
90 <row>
91 <entry>
92 gl_SampleMask
93 </entry>
94 <entry>
95 <emphasis>-</emphasis> <!-- 1.10, OpenGL 2.0 -->
96 </entry>
97 <entry>
98 <emphasis>-</emphasis> <!-- 1.20, OpenGL 2.1 -->
99 </entry>
100 <entry>
101 <emphasis>-</emphasis> <!-- 1.30, OpenGL 3.0 -->
102 </entry>
103 <entry>
104 <emphasis>-</emphasis> <!-- 1.40, OpenGL 3.1 -->
105 </entry>
106 <entry>
107 <emphasis>-</emphasis> <!-- 1.50, OpenGL 3.2 -->
108 </entry>
109 <entry>
110 <emphasis>-</emphasis> <!-- 3.30, OpenGL 3.3 -->
111 </entry>
112 <entry>
113 <emphasis>Y</emphasis> <!-- 4.00, OpenGL 4.0 -->
114 </entry>
115 <entry>
116 <emphasis>Y</emphasis> <!-- 4.10, OpenGL 4.1 -->
117 </entry>
118 <entry>
119 <emphasis>Y</emphasis> <!-- 4.20, OpenGL 4.2 -->
120 </entry>
121 </row>
122 </thead>
123 </tgroup>
124 </informaltable>
125 </refsect1>
126 <refsect1 id="seealso"><title>See Also</title>
127 <para>
128 <citerefentry><refentrytitle>gl_SampleMaskIn</refentrytitle></citerefentry>,
129 <citerefentry><refentrytitle>gl_SampleID</refentrytitle></citerefentry>,
130 <citerefentry><refentrytitle>gl_SamplePosition</refentrytitle></citerefentry>,
131 <citerefentry><refentrytitle>gl_FragCoord</refentrytitle></citerefentry>
132 </para>
133 </refsect1>
134 <refsect1 id="Copyright"><title>Copyright</title>
135 <para>
136 Copyright <trademark class="copyright"></trademark> 2011 Khronos Group.
137 This material may be distributed subject to the terms and conditions set forth in
138 the Open Publication License, v 1.0, 8 June 1999.
139 <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
140 </para>
141 </refsect1>
142 </refentry>