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=
"textureGatherOffsets">
9 <holder>Khronos Group
</holder>
12 <refentrytitle>textureGatherOffsets
</refentrytitle>
13 <manvolnum>3G
</manvolnum>
16 <refname>textureGatherOffsets
</refname>
17 <refpurpose>gathers four texels from a texture with an array of offsets
</refpurpose>
19 <refsynopsisdiv><title>Declaration
</title>
22 <funcdef>gvec4
<function>textureGatherOffsets
</function></funcdef>
23 <paramdef>gsampler2D
<parameter>sampler
</parameter></paramdef>
24 <paramdef>vec2
<parameter>P
</parameter></paramdef>
25 <paramdef>ivec2
<parameter>offsets[
4]
</parameter></paramdef>
26 <paramdef>[int
<parameter>comp]
</parameter></paramdef>
29 <funcdef>gvec4
<function>textureGatherOffsets
</function></funcdef>
30 <paramdef>gsampler2DArray
<parameter>sampler
</parameter></paramdef>
31 <paramdef>vec3
<parameter>P
</parameter></paramdef>
32 <paramdef>ivec2
<parameter>offsets[
4]
</parameter></paramdef>
33 <paramdef>[int
<parameter>comp]
</parameter></paramdef>
36 <funcdef>gvec4
<function>textureGatherOffsets
</function></funcdef>
37 <paramdef>gsampler2DRect
<parameter>sampler
</parameter></paramdef>
38 <paramdef>vec3
<parameter>P
</parameter></paramdef>
39 <paramdef>ivec2
<parameter>offsets[
4]
</parameter></paramdef>
40 <paramdef>[int
<parameter>comp]
</parameter></paramdef>
43 <funcdef>vec4
<function>textureGatherOffsets
</function></funcdef>
44 <paramdef>gsampler2DShadow
<parameter>sampler
</parameter></paramdef>
45 <paramdef>vec2
<parameter>P
</parameter></paramdef>
46 <paramdef>float
<parameter>refZ
</parameter></paramdef>
47 <paramdef>ivec2
<parameter>offsets[
4]
</parameter></paramdef>
50 <funcdef>vec4
<function>textureGatherOffsets
</function></funcdef>
51 <paramdef>gsampler2DArrayShadow
<parameter>sampler
</parameter></paramdef>
52 <paramdef>vec3
<parameter>P
</parameter></paramdef>
53 <paramdef>float
<parameter>refZ
</parameter></paramdef>
54 <paramdef>ivec2
<parameter>offsets[
4]
</parameter></paramdef>
57 <funcdef>vec4
<function>textureGatherOffsets
</function></funcdef>
58 <paramdef>gsampler2DRectShadow
<parameter>sampler
</parameter></paramdef>
59 <paramdef>vec3
<parameter>P
</parameter></paramdef>
60 <paramdef>float
<parameter>refZ
</parameter></paramdef>
61 <paramdef>ivec2
<parameter>offsets[
4]
</parameter></paramdef>
65 <refsect1 id=
"parameters"><title>Parameters
</title>
68 <term><parameter>sampler
</parameter></term>
71 Specifies the sampler to which the texture from which texels will be retrieved is bound.
76 <term><parameter>P
</parameter></term>
79 Specifies the texture coordinates at which texture will be sampled.
84 <term><parameter>comp
</parameter></term>
87 Specifies the component of the source texture that will be used to generate the resulting vector.
92 <term><parameter>refZ
</parameter></term>
95 Specifies the reference Z value used in the comparison for shadow forms.
100 <term><parameter>offsets
</parameter></term>
103 Specifies an array of offsets from the specified texture coordinate
<parameter>P
</parameter> from which the texels will be gathered.
109 <refsect1 id=
"description"><title>Description
</title>
111 <function>textureGatherOffsets
</function> operates identically to
<citerefentry><refentrytitle>textureGatherOffset
</refentrytitle></citerefentry>,
112 except that
<parameter>offsets
</parameter> is used to determine the location of the four texels to sample. Each of the four texels is obtained
113 by applying the offset in
<parameter>offsets
</parameter> as a (u, v) coordinate offset to
<parameter>P
</parameter>, identifying the four-texel
114 <constant>GL_LINEAR
</constant> footprint, and then selecting the texel
115 <inlineequation><mml:math><mml:msub><mml:mi>i
</mml:mi><mml:mn>0</mml:mn></mml:msub><mml:msub><mml:mi>i
</mml:mi><mml:mn>0</mml:mn></mml:msub></mml:math></inlineequation>
116 of that footprint. The specified values in
<parameter>offsets
</parameter> must be set with constant integral expressions.
119 <refsect1 id=
"versions"><title>Version Support
</title>
120 <informaltable frame=
"topbot">
125 <entry>textureGatherOffsets
</entry>#newin40#
131 <refsect1 id=
"seealso"><title>See Also
</title>
133 <citerefentry><refentrytitle>texelFetch
</refentrytitle></citerefentry>,
134 <citerefentry><refentrytitle>texelFetchOffset
</refentrytitle></citerefentry>,
135 <citerefentry><refentrytitle>texture
</refentrytitle></citerefentry>,
136 <citerefentry><refentrytitle>textureGather
</refentrytitle></citerefentry>,
137 <citerefentry><refentrytitle>textureGatherOffset
</refentrytitle></citerefentry>,
138 <citerefentry><refentrytitle>textureGrad
</refentrytitle></citerefentry>,
139 <citerefentry><refentrytitle>textureGradOffset
</refentrytitle></citerefentry>,
140 <citerefentry><refentrytitle>textureLod
</refentrytitle></citerefentry>,
141 <citerefentry><refentrytitle>textureLodOffset
</refentrytitle></citerefentry>,
142 <citerefentry><refentrytitle>textureOffset
</refentrytitle></citerefentry>,
143 <citerefentry><refentrytitle>textureProj
</refentrytitle></citerefentry>,
144 <citerefentry><refentrytitle>textureProjGrad
</refentrytitle></citerefentry>,
145 <citerefentry><refentrytitle>textureProjGradOffset
</refentrytitle></citerefentry>,
146 <citerefentry><refentrytitle>textureProjLod
</refentrytitle></citerefentry>,
147 <citerefentry><refentrytitle>textureProjLodOffset
</refentrytitle></citerefentry>,
148 <citerefentry><refentrytitle>textureProjOffset
</refentrytitle></citerefentry>,
149 <citerefentry><refentrytitle>textureQueryLod
</refentrytitle></citerefentry>,
150 <citerefentry><refentrytitle>textureSize
</refentrytitle></citerefentry>
153 <refsect1 id=
"Copyright"><title>Copyright
</title>
155 Copyright
<trademark class=
"copyright"></trademark> 2011 Khronos Group.
156 This material may be distributed subject to the terms and conditions set forth in
157 the Open Publication License, v
1.0,
8 June
1999.
158 <ulink url=
"http://opencontent.org/openpub/">http://opencontent.org/openpub/
</ulink>.