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