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_SampleID">\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_SampleID</refentrytitle>\r | |
13 | <manvolnum>3G</manvolnum>\r | |
14 | </refmeta>\r | |
15 | <refnamediv>\r | |
16 | <refname>gl_SampleID</refname>\r | |
17 | <refpurpose>contains the index of the sample currently being processed</refpurpose>\r | |
18 | </refnamediv>\r | |
19 | <refsynopsisdiv><title>Declaration</title>\r | |
20 | <funcsynopsis>\r | |
21 | <function>in int gl_SampleID;</function>\r | |
22 | </funcsynopsis>\r | |
23 | </refsynopsisdiv>\r | |
24 | <refsect1 id="description"><title>Description</title>\r | |
25 | <para>\r | |
26 | <function>gl_SampleID</function> is a fragment language input variable that contains\r | |
27 | the index of the sample currently being processed. This variable is in the range\r | |
28 | 0 to <citerefentry><refentrytitle>gl_NumSamples</refentrytitle></citerefentry> - 1, where\r | |
29 | <citerefentry><refentrytitle>gl_NumSamples</refentrytitle></citerefentry>\r | |
30 | is the total number of samples in each fragment for the current framebuffer (and thus 1 if\r | |
31 | rendering to a non-multisample buffer). Any static use of this variable in a fragment\r | |
32 | shader causes the entire shader to be evaluated per-sample rather than per-fragment.\r | |
33 | </para>\r | |
34 | <para>\r | |
35 | When rendering to a non-multisample buffer, or if multisample rasterization is disabled,\r | |
36 | <function>gl_SampleID</function> will always be zero. <citerefentry><refentrytitle>gl_NumSamples</refentrytitle></citerefentry>\r | |
37 | is the sample count of the framebuffer regardless of whether multisample rasterization is\r | |
38 | enabled or not.\r | |
39 | </para>\r | |
40 | </refsect1>\r | |
41 | <refsect1 id="versions"><title>Version Support</title>\r | |
42 | <informaltable frame="topbot">\r | |
43 | #VARTABLECOLS#\r | |
44 | <thead>\r | |
45 | #VARTABLEHEADER#\r | |
46 | <row>\r | |
47 | <entry>gl_SampleID</entry>#newin40#\r | |
48 | </row>\r | |
49 | </thead>\r | |
50 | </tgroup>\r | |
51 | </informaltable>\r | |
52 | </refsect1>\r | |
53 | <refsect1 id="seealso"><title>See Also</title>\r | |
54 | <para>\r | |
55 | <citerefentry><refentrytitle>gl_SamplePosition</refentrytitle></citerefentry>,\r | |
56 | <citerefentry><refentrytitle>gl_NumSamples</refentrytitle></citerefentry>\r | |
57 | </para>\r | |
58 | </refsect1>\r | |
59 | <refsect1 id="Copyright"><title>Copyright</title>\r | |
60 | <para>\r | |
61 | Copyright <trademark class="copyright"></trademark> 2011 Khronos Group. \r | |
62 | This material may be distributed subject to the terms and conditions set forth in \r | |
63 | the Open Publication License, v 1.0, 8 June 1999.\r | |
64 | <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.\r | |
65 | </para>\r | |
66 | </refsect1>\r | |
67 | </refentry>\r |