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">
9 <holder>Khronos Group
</holder>
12 <refentrytitle>textureLod
</refentrytitle>
13 <manvolnum>3G
</manvolnum>
16 <refname>textureLod
</refname>
17 <refpurpose>perform a texture lookup with explicit level-of-detail
</refpurpose>
19 <refsynopsisdiv><title>Declaration
</title>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
83 <refsect1 id=
"parameters"><title>Parameters
</title>
86 <term><parameter>sampler
</parameter></term>
89 Specifies the sampler to which the texture from which texels will be retrieved is bound.
94 <term><parameter>P
</parameter></term>
97 Specifies the texture coordinates at which texture will be sampled.
102 <term><parameter>lod
</parameter></term>
105 Specifies the explicit level-of-detail
111 <refsect1 id=
"description"><title>Description
</title>
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>λ</mml:mi><mml:mi>base
</mml:mi></mml:msub></mml:math></inlineequation>
117 and sets the partial derivatives as follows:
120 <inlineequation><mml:math>
121 <mml:mtable rowalign='center'
>
127 <mml:mi>δ</mml:mi>
131 <mml:mi>δ</mml:mi>
144 <mml:mi>δ</mml:mi>
148 <mml:mi>δ</mml:mi>
161 <mml:mi>δ</mml:mi>
165 <mml:mi>δ</mml:mi>
179 <mml:mi>δ</mml:mi>
183 <mml:mi>δ</mml:mi>
196 <mml:mi>δ</mml:mi>
200 <mml:mi>δ</mml:mi>
213 <mml:mi>δ</mml:mi>
217 <mml:mi>δ</mml:mi>
227 </mml:math></inlineequation>
230 <refsect1 id=
"versions"><title>Version Support
</title>
231 <informaltable frame=
"topbot">
236 <entry>textureLod
</entry>#newin13#
239 <entry>textureLod (gsampler2DRect{Shadow})
</entry>#newin14#
242 <entry>textureLod (gsamplerCubeArray)
</entry>#newin40#
248 <refsect1 id=
"seealso"><title>See Also
</title>
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>
270 <refsect1 id=
"Copyright"><title>Copyright
</title>
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>.