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=
"textureQueryLod">
9 <holder>Khronos Group
</holder>
12 <refentrytitle>textureQueryLod
</refentrytitle>
13 <manvolnum>3G
</manvolnum>
16 <refname>textureQueryLod
</refname>
17 <refpurpose>compute the level-of-detail that would be used to sample from a texture
</refpurpose>
19 <refsynopsisdiv><title>Declaration
</title>
22 <funcdef>vec2
<function>textureQueryLod
</function></funcdef>
23 <paramdef>gsampler1D
<parameter>sampler
</parameter></paramdef>
24 <paramdef>float
<parameter>P
</parameter></paramdef>
27 <funcdef>vec2
<function>textureQueryLod
</function></funcdef>
28 <paramdef>gsampler2D
<parameter>sampler
</parameter></paramdef>
29 <paramdef>vec2
<parameter>P
</parameter></paramdef>
32 <funcdef>vec2
<function>textureQueryLod
</function></funcdef>
33 <paramdef>gsampler3D
<parameter>sampler
</parameter></paramdef>
34 <paramdef>vec3
<parameter>P
</parameter></paramdef>
37 <funcdef>vec2
<function>textureQueryLod
</function></funcdef>
38 <paramdef>gsamplerCube
<parameter>sampler
</parameter></paramdef>
39 <paramdef>vec3
<parameter>P
</parameter></paramdef>
42 <funcdef>vec2
<function>textureQueryLod
</function></funcdef>
43 <paramdef>gsampler1DArray
<parameter>sampler
</parameter></paramdef>
44 <paramdef>float
<parameter>P
</parameter></paramdef>
47 <funcdef>vec2
<function>textureQueryLod
</function></funcdef>
48 <paramdef>gsampler2DDArray
<parameter>sampler
</parameter></paramdef>
49 <paramdef>vec2
<parameter>P
</parameter></paramdef>
52 <funcdef>vec2
<function>textureQueryLod
</function></funcdef>
53 <paramdef>gsamplerCubeArray
<parameter>sampler
</parameter></paramdef>
54 <paramdef>vec3
<parameter>P
</parameter></paramdef>
57 <funcdef>vec2
<function>textureQueryLod
</function></funcdef>
58 <paramdef>gsampler1DShadow
<parameter>sampler
</parameter></paramdef>
59 <paramdef>float
<parameter>P
</parameter></paramdef>
62 <funcdef>vec2
<function>textureQueryLod
</function></funcdef>
63 <paramdef>gsampler2DShadow
<parameter>sampler
</parameter></paramdef>
64 <paramdef>vec2
<parameter>P
</parameter></paramdef>
67 <funcdef>vec2
<function>textureQueryLod
</function></funcdef>
68 <paramdef>gsamplerCubeShadow
<parameter>sampler
</parameter></paramdef>
69 <paramdef>vec3
<parameter>P
</parameter></paramdef>
72 <funcdef>vec2
<function>textureQueryLod
</function></funcdef>
73 <paramdef>gsampler1DArrayShadow
<parameter>sampler
</parameter></paramdef>
74 <paramdef>float
<parameter>P
</parameter></paramdef>
77 <funcdef>vec2
<function>textureQueryLod
</function></funcdef>
78 <paramdef>gsampler2DArrayShadow
<parameter>sampler
</parameter></paramdef>
79 <paramdef>vec2
<parameter>P
</parameter></paramdef>
82 <funcdef>vec2
<function>textureQueryLod
</function></funcdef>
83 <paramdef>gsamplerCubeArrayShadow
<parameter>sampler
</parameter></paramdef>
84 <paramdef>vec3
<parameter>P
</parameter></paramdef>
88 <refsect1 id=
"parameters"><title>Parameters
</title>
91 <term><parameter>sampler
</parameter></term>
94 Specifies the sampler to which the texture whose level-of-detail will be queried is bound.
99 <term><parameter>P
</parameter></term>
102 Specifies the texture coordinates at which the level-of-detail will be queried.
108 <refsect1 id=
"description"><title>Description
</title>
110 <emphasis>Available only in the fragment shader
</emphasis>,
111 <function>textureQueryLod
</function> computes the level-of-detail that would be used to sample from
112 a texture. The mipmap array(s) that would be accessed is returned in the
<emphasis>x
</emphasis> component
113 of the return value. The computed level-of-detail relative to the base level is returned in the
114 <emphasis>y
</emphasis> component of the return value.
117 If called on an incomplete texture, the result of the operation is undefined.
120 <refsect1 id=
"versions"><title>Version Support
</title>
121 <informaltable frame=
"topbot">
126 <entry>textureQueryLod
</entry>#newin40#
132 <refsect1 id=
"seealso"><title>See Also
</title>
134 <citerefentry><refentrytitle>texelFetch
</refentrytitle></citerefentry>,
135 <citerefentry><refentrytitle>texelFetchOffset
</refentrytitle></citerefentry>,
136 <citerefentry><refentrytitle>texture
</refentrytitle></citerefentry>,
137 <citerefentry><refentrytitle>textureGather
</refentrytitle></citerefentry>,
138 <citerefentry><refentrytitle>textureGatherOffset
</refentrytitle></citerefentry>,
139 <citerefentry><refentrytitle>textureGatherOffsets
</refentrytitle></citerefentry>,
140 <citerefentry><refentrytitle>textureGrad
</refentrytitle></citerefentry>,
141 <citerefentry><refentrytitle>textureGradOffset
</refentrytitle></citerefentry>,
142 <citerefentry><refentrytitle>textureLod
</refentrytitle></citerefentry>,
143 <citerefentry><refentrytitle>textureLodOffset
</refentrytitle></citerefentry>,
144 <citerefentry><refentrytitle>textureOffset
</refentrytitle></citerefentry>,
145 <citerefentry><refentrytitle>textureProj
</refentrytitle></citerefentry>,
146 <citerefentry><refentrytitle>textureProjGrad
</refentrytitle></citerefentry>,
147 <citerefentry><refentrytitle>textureProjGradOffset
</refentrytitle></citerefentry>,
148 <citerefentry><refentrytitle>textureProjLod
</refentrytitle></citerefentry>,
149 <citerefentry><refentrytitle>textureProjLodOffset
</refentrytitle></citerefentry>,
150 <citerefentry><refentrytitle>textureProjOffset
</refentrytitle></citerefentry>,
151 <citerefentry><refentrytitle>textureSize
</refentrytitle></citerefentry>
154 <refsect1 id=
"Copyright"><title>Copyright
</title>
156 Copyright
<trademark class=
"copyright"></trademark> 2011 Khronos Group.
157 This material may be distributed subject to the terms and conditions set forth in
158 the Open Publication License, v
1.0,
8 June
1999.
159 <ulink url=
"http://opencontent.org/openpub/">http://opencontent.org/openpub/
</ulink>.