3d7550aca8d7e5b6e83ae2f4f242b9be2767c46a
[clinton/guile-figl.git] / upstream-man-pages / manglsl / texelFetchOffset.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="texelFetchOffsetOffset">
5 <refmeta>
6 <refmetainfo>
7 <copyright>
8 <year>2011</year>
9 <holder>Khronos Group</holder>
10 </copyright>
11 </refmetainfo>
12 <refentrytitle>texelFetchOffset</refentrytitle>
13 <manvolnum>3G</manvolnum>
14 </refmeta>
15 <refnamediv>
16 <refname>texelFetchOffset</refname>
17 <refpurpose>perform a lookup of a single texel within a texture with an offset</refpurpose>
18 </refnamediv>
19 <refsynopsisdiv><title>Declaration</title>
20 <funcsynopsis>
21 <funcprototype>
22 <funcdef>gvec4 <function>texelFetchOffset</function></funcdef>
23 <paramdef>gsampler1D <parameter>sampler</parameter></paramdef>
24 <paramdef>int <parameter>P</parameter></paramdef>
25 <paramdef>int <parameter>lod</parameter></paramdef>
26 <paramdef>int <parameter>offset</parameter></paramdef>
27 </funcprototype>
28 <funcprototype>
29 <funcdef>gvec4 <function>texelFetchOffset</function></funcdef>
30 <paramdef>gsampler2D <parameter>sampler</parameter></paramdef>
31 <paramdef>ivec2 <parameter>P</parameter></paramdef>
32 <paramdef>int <parameter>lod</parameter></paramdef>
33 <paramdef>int <parameter>offset</parameter></paramdef>
34 </funcprototype>
35 <funcprototype>
36 <funcdef>gvec4 <function>texelFetchOffset</function></funcdef>
37 <paramdef>gsampler3D <parameter>sampler</parameter></paramdef>
38 <paramdef>ivec3 <parameter>P</parameter></paramdef>
39 <paramdef>int <parameter>lod</parameter></paramdef>
40 <paramdef>int <parameter>offset</parameter></paramdef>
41 </funcprototype>
42 <funcprototype>
43 <funcdef>gvec4 <function>texelFetchOffset</function></funcdef>
44 <paramdef>gsampler2DRect <parameter>sampler</parameter></paramdef>
45 <paramdef>ivec2 <parameter>P</parameter></paramdef>
46 <paramdef>int <parameter>offset</parameter></paramdef>
47 </funcprototype>
48 <funcprototype>
49 <funcdef>gvec4 <function>texelFetchOffset</function></funcdef>
50 <paramdef>gsampler1DArray <parameter>sampler</parameter></paramdef>
51 <paramdef>ivec2 <parameter>P</parameter></paramdef>
52 <paramdef>int <parameter>lod</parameter></paramdef>
53 <paramdef>int <parameter>offset</parameter></paramdef>
54 </funcprototype>
55 <funcprototype>
56 <funcdef>gvec4 <function>texelFetchOffset</function></funcdef>
57 <paramdef>gsampler2DArray <parameter>sampler</parameter></paramdef>
58 <paramdef>ivec3 <parameter>P</parameter></paramdef>
59 <paramdef>int <parameter>lod</parameter></paramdef>
60 <paramdef>int <parameter>offset</parameter></paramdef>
61 </funcprototype>
62 </funcsynopsis>
63 </refsynopsisdiv>
64 <refsect1 id="parameters"><title>Parameters</title>
65 <variablelist>
66 <varlistentry>
67 <term><parameter>sampler</parameter></term>
68 <listitem>
69 <para>
70 Specifies the sampler to which the texture from which texels will be retrieved is bound.
71 </para>
72 </listitem>
73 </varlistentry>
74 <varlistentry>
75 <term><parameter>P</parameter></term>
76 <listitem>
77 <para>
78 Specifies the texture coordinates at which texture will be sampled.
79 </para>
80 </listitem>
81 </varlistentry>
82 <varlistentry>
83 <term><parameter>lod</parameter></term>
84 <listitem>
85 <para>
86 If present, specifies the level-of-detail within the texture from which the texel will be fetched.
87 </para>
88 </listitem>
89 </varlistentry>
90 <varlistentry>
91 <term><parameter>offset</parameter></term>
92 <listitem>
93 <para>
94 Specifies offset, in texels that will be applied to <parameter>P</parameter> before looking up the texel.
95 </para>
96 </listitem>
97 </varlistentry>
98 </variablelist>
99 </refsect1>
100 <refsect1 id="description"><title>Description</title>
101 <para>
102 <function>texelFetchOffset</function> performs a lookup of a single texel from texture coordinate <parameter>P</parameter>
103 in the texture bound to <parameter>sampler</parameter>. Before fetching the texel, the offset specified in <parameter>offset</parameter>
104 is added to <parameter>P</parameter>. <parameter>offset</parameter> must be a constant expression. The array layer is specified in the last component of
105 <parameter>P</parameter> for array forms. The <parameter>lod</parameter> parameter (if present) specifies the level-of-detail
106 from which the texel will be fetched. The <parameter>sample</parameter> parameter specifies which sample within the texel will be
107 returned when reading from a multi-sample texure.
108 </para>
109 </refsect1>
110 <refsect1 id="versions"><title>Version Support</title>
111 <informaltable frame="topbot">
112 #VARTABLECOLS#
113 <thead>
114 #FUNCTABLEHEADER#
115 <row>
116 <entry>texelFetchOffset</entry>#newin13#
117 </row>
118 <row>
119 <entry>texelFetchOffset (gsampler2DRect)</entry>#newin14#
120 </row>
121 <row>
122 <entry>texelFetchOffset (gsampler2DMS, gsampler2DMSArray)</entry>#newin15#
123 </row>
124 </thead>
125 </tgroup>
126 </informaltable>
127 </refsect1>
128 <refsect1 id="seealso"><title>See Also</title>
129 <para>
130 <citerefentry><refentrytitle>texelFetch</refentrytitle></citerefentry>,
131 <citerefentry><refentrytitle>texture</refentrytitle></citerefentry>,
132 <citerefentry><refentrytitle>textureGather</refentrytitle></citerefentry>,
133 <citerefentry><refentrytitle>textureGatherOffset</refentrytitle></citerefentry>,
134 <citerefentry><refentrytitle>textureGatherOffsets</refentrytitle></citerefentry>,
135 <citerefentry><refentrytitle>textureGrad</refentrytitle></citerefentry>,
136 <citerefentry><refentrytitle>textureGradOffset</refentrytitle></citerefentry>,
137 <citerefentry><refentrytitle>textureLod</refentrytitle></citerefentry>,
138 <citerefentry><refentrytitle>textureLodOffset</refentrytitle></citerefentry>,
139 <citerefentry><refentrytitle>textureOffset</refentrytitle></citerefentry>,
140 <citerefentry><refentrytitle>textureProj</refentrytitle></citerefentry>,
141 <citerefentry><refentrytitle>textureProjGrad</refentrytitle></citerefentry>,
142 <citerefentry><refentrytitle>textureProjGradOffset</refentrytitle></citerefentry>,
143 <citerefentry><refentrytitle>textureProjLod</refentrytitle></citerefentry>,
144 <citerefentry><refentrytitle>textureProjLodOffset</refentrytitle></citerefentry>,
145 <citerefentry><refentrytitle>textureProjOffset</refentrytitle></citerefentry>,
146 <citerefentry><refentrytitle>textureQueryLod</refentrytitle></citerefentry>,
147 <citerefentry><refentrytitle>textureSize</refentrytitle></citerefentry>
148 </para>
149 </refsect1>
150 <refsect1 id="Copyright"><title>Copyright</title>
151 <para>
152 Copyright <trademark class="copyright"></trademark> 2011 Khronos Group.
153 This material may be distributed subject to the terms and conditions set forth in
154 the Open Publication License, v 1.0, 8 June 1999.
155 <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
156 </para>
157 </refsect1>
158 </refentry>