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_SamplePosition">\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_SamplePosition</refentrytitle>\r | |
13 | <manvolnum>3G</manvolnum>\r | |
14 | </refmeta>\r | |
15 | <refnamediv>\r | |
16 | <refname>gl_SamplePosition</refname>\r | |
17 | <refpurpose>contains the location of the current sample within the current fragment</refpurpose>\r | |
18 | </refnamediv>\r | |
19 | <refsynopsisdiv><title>Declaration</title>\r | |
20 | <funcsynopsis>\r | |
21 | <function>in vec2 gl_SamplePosition;</function>\r | |
22 | </funcsynopsis>\r | |
23 | </refsynopsisdiv>\r | |
24 | <refsect1 id="description"><title>Description</title>\r | |
25 | <para>\r | |
26 | <function>gl_SamplePosition</function> is a fragment language input variable that contains\r | |
27 | the location within a fragment of the sample currently being processed. The x and y components\r | |
28 | of <function>gl_SamplePosition</function> contain the sub-pixel coordinate of the current\r | |
29 | sample and will have values in the range 0.0 to 1.0. The sub-pixel coordinates of the center\r | |
30 | of the pixel are always (0.5, 0.5). Any static use of <function>gl_SamplePosition</function>\r | |
31 | causes the entire fragment shader to be evaluated per-sample rather than per-fragment. When rendering\r | |
32 | to a non-multisample buffer, or if multisample rasterization is disabled, <function>gl_SamplePosition</function>\r | |
33 | will be (0.5, 0.5).\r | |
34 | </para>\r | |
35 | </refsect1>\r | |
36 | <refsect1 id="versions"><title>Version Support</title>\r | |
37 | <informaltable frame="topbot">\r | |
38 | <tgroup cols="3" align="left">\r | |
39 | <colspec colwidth="1.1*" />\r | |
40 | <colspec colwidth="1*" align="center" />\r | |
41 | <colspec colwidth="1*" align="center" />\r | |
42 | <colspec colwidth="1*" align="center" />\r | |
43 | <colspec colwidth="1*" align="center" />\r | |
44 | <colspec colwidth="1*" align="center" />\r | |
45 | <colspec colwidth="1*" align="center" />\r | |
46 | <colspec colwidth="1*" align="center" />\r | |
47 | <colspec colwidth="1*" align="center" />\r | |
48 | <thead>\r | |
49 | <row>\r | |
50 | <entry rowsep="1" align="left"><emphasis role="bold">\r | |
51 | Variable\r | |
52 | </emphasis></entry>\r | |
53 | <entry rowsep="1" align="left"><emphasis role="bold">\r | |
54 | Version 1.10\r | |
55 | </emphasis></entry>\r | |
56 | <entry rowsep="1" align="left"><emphasis role="bold">\r | |
57 | Version 1.20\r | |
58 | </emphasis></entry>\r | |
59 | <entry rowsep="1" align="left"><emphasis role="bold">\r | |
60 | Version 1.30\r | |
61 | </emphasis></entry>\r | |
62 | <entry rowsep="1" align="left"><emphasis role="bold">\r | |
63 | Version 1.40\r | |
64 | </emphasis></entry>\r | |
65 | <entry rowsep="1" align="left"><emphasis role="bold">\r | |
66 | Version 1.50\r | |
67 | </emphasis></entry>\r | |
68 | <entry rowsep="1" align="left"><emphasis role="bold">\r | |
69 | Version 3.30\r | |
70 | </emphasis></entry>\r | |
71 | <entry rowsep="1" align="left"><emphasis role="bold">\r | |
72 | Version 4.00\r | |
73 | </emphasis></entry>\r | |
74 | <entry rowsep="1" align="left"><emphasis role="bold">\r | |
75 | Version 4.10\r | |
76 | </emphasis></entry>\r | |
77 | </row>\r | |
78 | <row>\r | |
79 | <entry>\r | |
80 | gl_SamplePosition\r | |
81 | </entry>\r | |
82 | <entry>\r | |
83 | <emphasis>-</emphasis> <!-- 1.10, OpenGL 2.0 -->\r | |
84 | </entry>\r | |
85 | <entry>\r | |
86 | <emphasis>-</emphasis> <!-- 1.20, OpenGL 2.1 -->\r | |
87 | </entry>\r | |
88 | <entry>\r | |
89 | <emphasis>-</emphasis> <!-- 1.30, OpenGL 3.0 -->\r | |
90 | </entry>\r | |
91 | <entry>\r | |
92 | <emphasis>-</emphasis> <!-- 1.40, OpenGL 3.1 -->\r | |
93 | </entry>\r | |
94 | <entry>\r | |
95 | <emphasis>-</emphasis> <!-- 1.50, OpenGL 3.2 -->\r | |
96 | </entry>\r | |
97 | <entry>\r | |
98 | <emphasis>-</emphasis> <!-- 3.30, OpenGL 3.3 -->\r | |
99 | </entry>\r | |
100 | <entry>\r | |
101 | <emphasis>Y</emphasis> <!-- 4.00, OpenGL 4.0 -->\r | |
102 | </entry>\r | |
103 | <entry>\r | |
104 | <emphasis>Y</emphasis> <!-- 4.10, OpenGL 4.1 -->\r | |
105 | </entry>\r | |
106 | </row>\r | |
107 | </thead>\r | |
108 | </tgroup>\r | |
109 | </informaltable>\r | |
110 | </refsect1>\r | |
111 | <refsect1 id="seealso"><title>See Also</title>\r | |
112 | <para>\r | |
113 | <citerefentry><refentrytitle>gl_SampleID</refentrytitle></citerefentry>,\r | |
114 | <citerefentry><refentrytitle>gl_SampleMask</refentrytitle></citerefentry>,\r | |
115 | <citerefentry><refentrytitle>gl_FragCoord</refentrytitle></citerefentry>\r | |
116 | </para>\r | |
117 | </refsect1>\r | |
118 | <refsect1 id="Copyright"><title>Copyright</title>\r | |
119 | <para>\r | |
120 | Copyright <trademark class="copyright"></trademark> 2011 Khronos Group. \r | |
121 | This material may be distributed subject to the terms and conditions set forth in \r | |
122 | the Open Publication License, v 1.0, 8 June 1999.\r | |
123 | <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.\r | |
124 | </para>\r | |
125 | </refsect1>\r | |
126 | </refentry>\r |