include more low-level bindings
[clinton/guile-figl.git] / upstream-man-pages / manglsl / textureLod.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="textureLod">
5 <refmeta>
6 <refmetainfo>
7 <copyright>
8 <year>2011</year>
9 <holder>Khronos Group</holder>
10 </copyright>
11 </refmetainfo>
12 <refentrytitle>textureLod</refentrytitle>
13 <manvolnum>3G</manvolnum>
14 </refmeta>
15 <refnamediv>
16 <refname>textureLod</refname>
17 <refpurpose>perform a texture lookup with explicit level-of-detail</refpurpose>
18 </refnamediv>
19 <refsynopsisdiv><title>Declaration</title>
20 <funcsynopsis>
21 <funcprototype>
22 <funcdef>gvec4 <function>textureLod</function></funcdef>
23 <paramdef>gsampler1D <parameter>sampler</parameter></paramdef>
24 <paramdef>float <parameter>P</parameter></paramdef>
25 <paramdef>float <parameter>lod</parameter></paramdef>
26 </funcprototype>
27 <funcprototype>
28 <funcdef>gvec4 <function>textureLod</function></funcdef>
29 <paramdef>gsampler2D <parameter>sampler</parameter></paramdef>
30 <paramdef>vec2 <parameter>P</parameter></paramdef>
31 <paramdef>float <parameter>lod</parameter></paramdef>
32 </funcprototype>
33 <funcprototype>
34 <funcdef>gvec4 <function>textureLod</function></funcdef>
35 <paramdef>gsampler3D <parameter>sampler</parameter></paramdef>
36 <paramdef>vec3 <parameter>P</parameter></paramdef>
37 <paramdef>float <parameter>lod</parameter></paramdef>
38 </funcprototype>
39 <funcprototype>
40 <funcdef>gvec4 <function>textureLod</function></funcdef>
41 <paramdef>gsamplerCube <parameter>sampler</parameter></paramdef>
42 <paramdef>vec3 <parameter>P</parameter></paramdef>
43 <paramdef>float <parameter>lod</parameter></paramdef>
44 </funcprototype>
45 <funcprototype>
46 <funcdef>float <function>textureLod</function></funcdef>
47 <paramdef>sampler1DShadow <parameter>sampler</parameter></paramdef>
48 <paramdef>vec3 <parameter>P</parameter></paramdef>
49 <paramdef>float <parameter>lod</parameter></paramdef>
50 </funcprototype>
51 <funcprototype>
52 <funcdef>float <function>textureLod</function></funcdef>
53 <paramdef>sampler2DShadow <parameter>sampler</parameter></paramdef>
54 <paramdef>vec4 <parameter>P</parameter></paramdef>
55 <paramdef>float <parameter>lod</parameter></paramdef>
56 </funcprototype>
57 <funcprototype>
58 <funcdef>gvec4 <function>textureLod</function></funcdef>
59 <paramdef>gsampler1DArray <parameter>sampler</parameter></paramdef>
60 <paramdef>vec2 <parameter>P</parameter></paramdef>
61 <paramdef>float <parameter>lod</parameter></paramdef>
62 </funcprototype>
63 <funcprototype>
64 <funcdef>gvec4 <function>textureLod</function></funcdef>
65 <paramdef>gsampler2DArray <parameter>sampler</parameter></paramdef>
66 <paramdef>vec3 <parameter>P</parameter></paramdef>
67 <paramdef>float <parameter>lod</parameter></paramdef>
68 </funcprototype>
69 <funcprototype>
70 <funcdef>float <function>textureLod</function></funcdef>
71 <paramdef>sampler1DArrayShadow <parameter>sampler</parameter></paramdef>
72 <paramdef>vec3 <parameter>P</parameter></paramdef>
73 <paramdef>float <parameter>lod</parameter></paramdef>
74 </funcprototype>
75 <funcprototype>
76 <funcdef>gvec4 <function>textureLod</function></funcdef>
77 <paramdef>gsamplerCubeArray <parameter>sampler</parameter></paramdef>
78 <paramdef>vec4 <parameter>P</parameter></paramdef>
79 <paramdef>float <parameter>lod</parameter></paramdef>
80 </funcprototype>
81 </funcsynopsis>
82 </refsynopsisdiv>
83 <refsect1 id="parameters"><title>Parameters</title>
84 <variablelist>
85 <varlistentry>
86 <term><parameter>sampler</parameter></term>
87 <listitem>
88 <para>
89 Specifies the sampler to which the texture from which texels will be retrieved is bound.
90 </para>
91 </listitem>
92 </varlistentry>
93 <varlistentry>
94 <term><parameter>P</parameter></term>
95 <listitem>
96 <para>
97 Specifies the texture coordinates at which texture will be sampled.
98 </para>
99 </listitem>
100 </varlistentry>
101 <varlistentry>
102 <term><parameter>lod</parameter></term>
103 <listitem>
104 <para>
105 Specifies the explicit level-of-detail
106 </para>
107 </listitem>
108 </varlistentry>
109 </variablelist>
110 </refsect1>
111 <refsect1 id="description"><title>Description</title>
112 <para>
113 <function>textureLod</function> performs a texture lookup at coordinate <parameter>P</parameter> from the
114 texture bound to <parameter>sampler</parameter> with an explicit level-of-detail as specified in <parameter>lod</parameter>.
115 <parameter>lod</parameter> specifies
116 <inlineequation><mml:math><mml:msub><mml:mi>&lambda;</mml:mi><mml:mi>base</mml:mi></mml:msub></mml:math></inlineequation>
117 and sets the partial derivatives as follows:
118 </para>
119 <para>
120 <inlineequation><mml:math>
121 <mml:mtable rowalign='center'>
122 <mml:mtr>
123 <mml:mtd>
124 <mml:mrow>
125 <mml:mfrac>
126 <mml:mrow>
127 <mml:mi>&delta;</mml:mi>
128 <mml:mi>u</mml:mi>
129 </mml:mrow>
130 <mml:mrow>
131 <mml:mi>&delta;</mml:mi>
132 <mml:mi>x</mml:mi>
133 </mml:mrow>
134 </mml:mfrac>
135 <mml:mo>=</mml:mo>
136 <mml:mn>0</mml:mn>
137 <mml:mo>,</mml:mo>
138 </mml:mrow>
139 </mml:mtd>
140 <mml:mtd>
141 <mml:mrow>
142 <mml:mfrac>
143 <mml:mrow>
144 <mml:mi>&delta;</mml:mi>
145 <mml:mi>v</mml:mi>
146 </mml:mrow>
147 <mml:mrow>
148 <mml:mi>&delta;</mml:mi>
149 <mml:mi>x</mml:mi>
150 </mml:mrow>
151 </mml:mfrac>
152 <mml:mo>=</mml:mo>
153 <mml:mn>0</mml:mn>
154 <mml:mo>,</mml:mo>
155 </mml:mrow>
156 </mml:mtd>
157 <mml:mtd>
158 <mml:mrow>
159 <mml:mfrac>
160 <mml:mrow>
161 <mml:mi>&delta;</mml:mi>
162 <mml:mi>w</mml:mi>
163 </mml:mrow>
164 <mml:mrow>
165 <mml:mi>&delta;</mml:mi>
166 <mml:mi>x</mml:mi>
167 </mml:mrow>
168 </mml:mfrac>
169 <mml:mo>=</mml:mo>
170 <mml:mn>0</mml:mn>
171 </mml:mrow>
172 </mml:mtd>
173 </mml:mtr>
174 <mml:mtr>
175 <mml:mtd>
176 <mml:mrow>
177 <mml:mfrac>
178 <mml:mrow>
179 <mml:mi>&delta;</mml:mi>
180 <mml:mi>u</mml:mi>
181 </mml:mrow>
182 <mml:mrow>
183 <mml:mi>&delta;</mml:mi>
184 <mml:mi>y</mml:mi>
185 </mml:mrow>
186 </mml:mfrac>
187 <mml:mo>=</mml:mo>
188 <mml:mn>0</mml:mn>
189 <mml:mo>,</mml:mo>
190 </mml:mrow>
191 </mml:mtd>
192 <mml:mtd>
193 <mml:mrow>
194 <mml:mfrac>
195 <mml:mrow>
196 <mml:mi>&delta;</mml:mi>
197 <mml:mi>v</mml:mi>
198 </mml:mrow>
199 <mml:mrow>
200 <mml:mi>&delta;</mml:mi>
201 <mml:mi>y</mml:mi>
202 </mml:mrow>
203 </mml:mfrac>
204 <mml:mo>=</mml:mo>
205 <mml:mn>0</mml:mn>
206 <mml:mo>,</mml:mo>
207 </mml:mrow>
208 </mml:mtd>
209 <mml:mtd>
210 <mml:mrow>
211 <mml:mfrac>
212 <mml:mrow>
213 <mml:mi>&delta;</mml:mi>
214 <mml:mi>w</mml:mi>
215 </mml:mrow>
216 <mml:mrow>
217 <mml:mi>&delta;</mml:mi>
218 <mml:mi>y</mml:mi>
219 </mml:mrow>
220 </mml:mfrac>
221 <mml:mo>=</mml:mo>
222 <mml:mn>0</mml:mn>
223 </mml:mrow>
224 </mml:mtd>
225 </mml:mtr>
226 </mml:mtable>
227 </mml:math></inlineequation>
228 </para>
229 </refsect1>
230 <refsect1 id="versions"><title>Version Support</title>
231 <informaltable frame="topbot">
232 #VARTABLECOLS#
233 <thead>
234 #FUNCTABLEHEADER#
235 <row>
236 <entry>textureLod</entry>#newin13#
237 </row>
238 <row>
239 <entry>textureLod (gsampler2DRect{Shadow})</entry>#newin14#
240 </row>
241 <row>
242 <entry>textureLod (gsamplerCubeArray)</entry>#newin40#
243 </row>
244 </thead>
245 </tgroup>
246 </informaltable>
247 </refsect1>
248 <refsect1 id="seealso"><title>See Also</title>
249 <para>
250 <citerefentry><refentrytitle>texelFetch</refentrytitle></citerefentry>,
251 <citerefentry><refentrytitle>texelFetchOffset</refentrytitle></citerefentry>,
252 <citerefentry><refentrytitle>texture</refentrytitle></citerefentry>,
253 <citerefentry><refentrytitle>textureGather</refentrytitle></citerefentry>,
254 <citerefentry><refentrytitle>textureGatherOffset</refentrytitle></citerefentry>,
255 <citerefentry><refentrytitle>textureGatherOffsets</refentrytitle></citerefentry>,
256 <citerefentry><refentrytitle>textureGrad</refentrytitle></citerefentry>,
257 <citerefentry><refentrytitle>textureGradOffset</refentrytitle></citerefentry>,
258 <citerefentry><refentrytitle>textureLodOffset</refentrytitle></citerefentry>,
259 <citerefentry><refentrytitle>textureOffset</refentrytitle></citerefentry>,
260 <citerefentry><refentrytitle>textureProj</refentrytitle></citerefentry>,
261 <citerefentry><refentrytitle>textureProjGrad</refentrytitle></citerefentry>,
262 <citerefentry><refentrytitle>textureProjGradOffset</refentrytitle></citerefentry>,
263 <citerefentry><refentrytitle>textureProjLod</refentrytitle></citerefentry>,
264 <citerefentry><refentrytitle>textureProjLodOffset</refentrytitle></citerefentry>,
265 <citerefentry><refentrytitle>textureProjOffset</refentrytitle></citerefentry>,
266 <citerefentry><refentrytitle>textureQueryLod</refentrytitle></citerefentry>,
267 <citerefentry><refentrytitle>textureSize</refentrytitle></citerefentry>
268 </para>
269 </refsect1>
270 <refsect1 id="Copyright"><title>Copyright</title>
271 <para>
272 Copyright <trademark class="copyright"></trademark> 2011 Khronos Group.
273 This material may be distributed subject to the terms and conditions set forth in
274 the Open Publication License, v 1.0, 8 June 1999.
275 <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
276 </para>
277 </refsect1>
278 </refentry>