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