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