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="textureGather">\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>textureGather</refentrytitle>\r | |
13 | <manvolnum>3G</manvolnum>\r | |
14 | </refmeta>\r | |
15 | <refnamediv>\r | |
16 | <refname>textureGather</refname>\r | |
17 | <refpurpose>gathers four texels from a texture</refpurpose>\r | |
18 | </refnamediv>\r | |
19 | <refsynopsisdiv><title>Declaration</title>\r | |
20 | <funcsynopsis>\r | |
21 | <funcprototype>\r | |
22 | <funcdef>gvec4 <function>textureGather</function></funcdef>\r | |
23 | <paramdef>gsampler2D <parameter>sampler</parameter></paramdef>\r | |
24 | <paramdef>vec2 <parameter>P</parameter></paramdef>\r | |
25 | <paramdef>[int <parameter>comp]</parameter></paramdef>\r | |
26 | </funcprototype>\r | |
27 | <funcprototype>\r | |
28 | <funcdef>gvec4 <function>textureGather</function></funcdef>\r | |
29 | <paramdef>gsampler2DArray <parameter>sampler</parameter></paramdef>\r | |
30 | <paramdef>vec3 <parameter>P</parameter></paramdef>\r | |
31 | <paramdef>[int <parameter>comp]</parameter></paramdef>\r | |
32 | </funcprototype>\r | |
33 | <funcprototype>\r | |
34 | <funcdef>gvec4 <function>textureGather</function></funcdef>\r | |
35 | <paramdef>gsamplerCube <parameter>sampler</parameter></paramdef>\r | |
36 | <paramdef>vec3 <parameter>P</parameter></paramdef>\r | |
37 | <paramdef>[int <parameter>comp]</parameter></paramdef>\r | |
38 | </funcprototype>\r | |
39 | <funcprototype>\r | |
40 | <funcdef>gvec4 <function>textureGather</function></funcdef>\r | |
41 | <paramdef>gsamplerCubeArray <parameter>sampler</parameter></paramdef>\r | |
42 | <paramdef>vec4 <parameter>P</parameter></paramdef>\r | |
43 | <paramdef>[int <parameter>comp]</parameter></paramdef>\r | |
44 | </funcprototype>\r | |
45 | <funcprototype>\r | |
46 | <funcdef>gvec4 <function>textureGather</function></funcdef>\r | |
47 | <paramdef>gsampler2DRect <parameter>sampler</parameter></paramdef>\r | |
48 | <paramdef>vec3 <parameter>P</parameter></paramdef>\r | |
49 | <paramdef>[int <parameter>comp]</parameter></paramdef>\r | |
50 | </funcprototype>\r | |
51 | <funcprototype>\r | |
52 | <funcdef>vec4 <function>textureGather</function></funcdef>\r | |
53 | <paramdef>gsampler2DShadow <parameter>sampler</parameter></paramdef>\r | |
54 | <paramdef>vec2 <parameter>P</parameter></paramdef>\r | |
55 | <paramdef>float <parameter>refZ</parameter></paramdef>\r | |
56 | </funcprototype>\r | |
57 | <funcprototype>\r | |
58 | <funcdef>vec4 <function>textureGather</function></funcdef>\r | |
59 | <paramdef>gsampler2DArrayShadow <parameter>sampler</parameter></paramdef>\r | |
60 | <paramdef>vec3 <parameter>P</parameter></paramdef>\r | |
61 | <paramdef>float <parameter>refZ</parameter></paramdef>\r | |
62 | </funcprototype>\r | |
63 | <funcprototype>\r | |
64 | <funcdef>vec4 <function>textureGather</function></funcdef>\r | |
65 | <paramdef>gsamplerCubeShadow <parameter>sampler</parameter></paramdef>\r | |
66 | <paramdef>vec3 <parameter>P</parameter></paramdef>\r | |
67 | <paramdef>float <parameter>refZ</parameter></paramdef>\r | |
68 | </funcprototype>\r | |
69 | <funcprototype>\r | |
70 | <funcdef>vec4 <function>textureGather</function></funcdef>\r | |
71 | <paramdef>gsamplerCubeArrayShadow <parameter>sampler</parameter></paramdef>\r | |
72 | <paramdef>vec4 <parameter>P</parameter></paramdef>\r | |
73 | <paramdef>float <parameter>refZ</parameter></paramdef>\r | |
74 | </funcprototype>\r | |
75 | <funcprototype>\r | |
76 | <funcdef>vec4 <function>textureGather</function></funcdef>\r | |
77 | <paramdef>gsampler2DRectShadow <parameter>sampler</parameter></paramdef>\r | |
78 | <paramdef>vec3 <parameter>P</parameter></paramdef>\r | |
79 | <paramdef>float <parameter>refZ</parameter></paramdef>\r | |
80 | </funcprototype>\r | |
81 | </funcsynopsis>\r | |
82 | </refsynopsisdiv>\r | |
83 | <refsect1 id="parameters"><title>Parameters</title>\r | |
84 | <variablelist>\r | |
85 | <varlistentry>\r | |
86 | <term><parameter>sampler</parameter></term>\r | |
87 | <listitem>\r | |
88 | <para>\r | |
89 | Specifies the sampler to which the texture from which texels will be retrieved is bound.\r | |
90 | </para>\r | |
91 | </listitem>\r | |
92 | </varlistentry>\r | |
93 | <varlistentry>\r | |
94 | <term><parameter>P</parameter></term>\r | |
95 | <listitem>\r | |
96 | <para>\r | |
97 | Specifies the texture coordinates at which texture will be sampled.\r | |
98 | </para>\r | |
99 | </listitem>\r | |
100 | </varlistentry>\r | |
101 | <varlistentry>\r | |
102 | <term><parameter>comp</parameter></term>\r | |
103 | <listitem>\r | |
104 | <para>\r | |
105 | Specifies the component of the source texture that will be used to generate the resulting vector.\r | |
106 | </para>\r | |
107 | </listitem>\r | |
108 | </varlistentry>\r | |
109 | <varlistentry>\r | |
110 | <term><parameter>refZ</parameter></term>\r | |
111 | <listitem>\r | |
112 | <para>\r | |
113 | Specifies the reference Z value used in the comparison for shadow forms.\r | |
114 | </para>\r | |
115 | </listitem>\r | |
116 | </varlistentry>\r | |
117 | </variablelist>\r | |
118 | </refsect1>\r | |
119 | <refsect1 id="description"><title>Description</title>\r | |
120 | <para>\r | |
121 | <function>textureGather</function> returns the value:\r | |
122 | </para>\r | |
123 | <para>\r | |
124 | <programlisting><![CDATA[ vec4(Sample_i0_j1(P, base).comp,\r | |
125 | Sample_i1_j1(P, base).comp,\r | |
126 | Sample_i1_j0(P, base).comp,\r | |
127 | Sample_i0_j9(P, base).comp);]]></programlisting>\r | |
128 | </para>\r | |
129 | <para>\r | |
130 | If specified, the value of <parameter>comp</parameter> must ba constant integer expression with a value\r | |
131 | of 0, 1, 2, or 3, identifying the x, y, z or w component of the four-component vector lookup result for each\r | |
132 | texel, respectively. If <parameter>comp</parameter> is not specified, it is treated as 0, selecting the x\r | |
133 | component of each texel to generate the result.\r | |
134 | </para>\r | |
135 | </refsect1>\r | |
136 | <refsect1 id="versions"><title>Version Support</title>\r | |
137 | <informaltable frame="topbot">\r | |
138 | #VARTABLECOLS#\r | |
139 | <thead>\r | |
140 | #FUNCTABLEHEADER#\r | |
141 | <row>\r | |
142 | <entry>textureGather</entry>#newin40#\r | |
143 | </row>\r | |
144 | </thead>\r | |
145 | </tgroup>\r | |
146 | </informaltable>\r | |
147 | </refsect1>\r | |
148 | <refsect1 id="seealso"><title>See Also</title>\r | |
149 | <para>\r | |
150 | <citerefentry><refentrytitle>texelFetch</refentrytitle></citerefentry>,\r | |
151 | <citerefentry><refentrytitle>texelFetchOffset</refentrytitle></citerefentry>,\r | |
152 | <citerefentry><refentrytitle>texture</refentrytitle></citerefentry>,\r | |
153 | <citerefentry><refentrytitle>textureGatherOffset</refentrytitle></citerefentry>,\r | |
154 | <citerefentry><refentrytitle>textureGatherOffsets</refentrytitle></citerefentry>,\r | |
155 | <citerefentry><refentrytitle>textureGrad</refentrytitle></citerefentry>,\r | |
156 | <citerefentry><refentrytitle>textureGradOffset</refentrytitle></citerefentry>,\r | |
157 | <citerefentry><refentrytitle>textureLod</refentrytitle></citerefentry>,\r | |
158 | <citerefentry><refentrytitle>textureLodOffset</refentrytitle></citerefentry>,\r | |
159 | <citerefentry><refentrytitle>textureOffset</refentrytitle></citerefentry>,\r | |
160 | <citerefentry><refentrytitle>textureProj</refentrytitle></citerefentry>,\r | |
161 | <citerefentry><refentrytitle>textureProjGrad</refentrytitle></citerefentry>,\r | |
162 | <citerefentry><refentrytitle>textureProjGradOffset</refentrytitle></citerefentry>,\r | |
163 | <citerefentry><refentrytitle>textureProjLod</refentrytitle></citerefentry>,\r | |
164 | <citerefentry><refentrytitle>textureProjLodOffset</refentrytitle></citerefentry>,\r | |
165 | <citerefentry><refentrytitle>textureProjOffset</refentrytitle></citerefentry>,\r | |
166 | <citerefentry><refentrytitle>textureQueryLod</refentrytitle></citerefentry>,\r | |
167 | <citerefentry><refentrytitle>textureSize</refentrytitle></citerefentry>\r | |
168 | </para>\r | |
169 | </refsect1>\r | |
170 | <refsect1 id="Copyright"><title>Copyright</title>\r | |
171 | <para>\r | |
172 | Copyright <trademark class="copyright"></trademark> 2011 Khronos Group. \r | |
173 | This material may be distributed subject to the terms and conditions set forth in \r | |
174 | the Open Publication License, v 1.0, 8 June 1999.\r | |
175 | <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.\r | |
176 | </para>\r | |
177 | </refsect1>\r | |
178 | </refentry>\r |