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=
"textureProj">
9 <holder>Khronos Group
</holder>
12 <refentrytitle>textureProj
</refentrytitle>
13 <manvolnum>3G
</manvolnum>
16 <refname>textureProj
</refname>
17 <refpurpose>perform a texture lookup with projection
</refpurpose>
19 <refsynopsisdiv><title>Declaration
</title>
22 <funcdef>gvec4
<function>textureProj
</function></funcdef>
23 <paramdef>gsampler1D
<parameter>sampler
</parameter></paramdef>
24 <paramdef>vec2
<parameter>P
</parameter></paramdef>
25 <paramdef>[float
<parameter>bias
</parameter>]
</paramdef>
28 <funcdef>gvec4
<function>textureProj
</function></funcdef>
29 <paramdef>gsampler1D
<parameter>sampler
</parameter></paramdef>
30 <paramdef>vec4
<parameter>P
</parameter></paramdef>
31 <paramdef>[float
<parameter>bias
</parameter>]
</paramdef>
34 <funcdef>gvec4
<function>textureProj
</function></funcdef>
35 <paramdef>gsampler2D
<parameter>sampler
</parameter></paramdef>
36 <paramdef>vec3
<parameter>P
</parameter></paramdef>
37 <paramdef>[float
<parameter>bias
</parameter>]
</paramdef>
40 <funcdef>gvec4
<function>textureProj
</function></funcdef>
41 <paramdef>gsampler2D
<parameter>sampler
</parameter></paramdef>
42 <paramdef>vec4
<parameter>P
</parameter></paramdef>
43 <paramdef>[float
<parameter>bias
</parameter>]
</paramdef>
46 <funcdef>gvec4
<function>textureProj
</function></funcdef>
47 <paramdef>gsampler3D
<parameter>sampler
</parameter></paramdef>
48 <paramdef>vec4
<parameter>P
</parameter></paramdef>
49 <paramdef>[float
<parameter>bias
</parameter>]
</paramdef>
52 <funcdef>float
<function>textureProj
</function></funcdef>
53 <paramdef>sampler1DShadow
<parameter>sampler
</parameter></paramdef>
54 <paramdef>vec4
<parameter>P
</parameter></paramdef>
55 <paramdef>[float
<parameter>bias
</parameter>]
</paramdef>
58 <funcdef>float
<function>textureProj
</function></funcdef>
59 <paramdef>sampler2DShadow
<parameter>sampler
</parameter></paramdef>
60 <paramdef>vec4
<parameter>P
</parameter></paramdef>
61 <paramdef>[float
<parameter>bias
</parameter>]
</paramdef>
64 <funcdef>gvec4
<function>textureProj
</function></funcdef>
65 <paramdef>gsampler2DRect
<parameter>sampler
</parameter></paramdef>
66 <paramdef>vec3
<parameter>P
</parameter></paramdef>
69 <funcdef>gvec4
<function>textureProj
</function></funcdef>
70 <paramdef>gsampler2DRect
<parameter>sampler
</parameter></paramdef>
71 <paramdef>vec4
<parameter>P
</parameter></paramdef>
74 <funcdef>float
<function>textureProj
</function></funcdef>
75 <paramdef>gsampler2DRectShadow
<parameter>sampler
</parameter></paramdef>
76 <paramdef>vec4
<parameter>P
</parameter></paramdef>
80 <refsect1 id=
"parameters"><title>Parameters
</title>
83 <term><parameter>sampler
</parameter></term>
86 Specifies the sampler to which the texture from which texels will be retrieved is bound.
91 <term><parameter>P
</parameter></term>
94 Specifies the texture coordinates at which texture will be sampled.
99 <term><parameter>bias
</parameter></term>
102 Specifies an optional bias to be applied during level-of-detail computation.
108 <refsect1 id=
"description"><title>Description
</title>
110 <function>textureProj
</function> performs a texture lookup with projection. The texture coordinates
111 consumed from
<parameter>P
</parameter>, not including the last component of
<parameter>P
</parameter>,
112 are divided by the last component of
<parameter>P
</parameter>. The resulting
<inlineequation><mml:math><mml:msup><mml:mn>3</mml:mn><mml:mi>rd
</mml:mi></mml:msup></mml:math></inlineequation>
113 component of
<parameter>P
</parameter> in the shadow forms is used as
114 <inlineequation><mml:math><mml:msub><mml:mi>D
</mml:mi><mml:mi>ref
</mml:mi></mml:msub></mml:math></inlineequation>.
115 After these values are computed, the texture lookup proceeds as in
<citerefentry><refentrytitle>texture
</refentrytitle></citerefentry>.
118 <refsect1 id=
"versions"><title>Version Support
</title>
119 <informaltable frame=
"topbot">
124 <entry>textureProj
</entry>#newin13#
127 <entry>textureProj (gsampler2DRect{Shadow})
</entry>#newin14#
133 <refsect1 id=
"seealso"><title>See Also
</title>
135 <citerefentry><refentrytitle>texelFetch
</refentrytitle></citerefentry>,
136 <citerefentry><refentrytitle>texelFetchOffset
</refentrytitle></citerefentry>,
137 <citerefentry><refentrytitle>texture
</refentrytitle></citerefentry>,
138 <citerefentry><refentrytitle>textureGather
</refentrytitle></citerefentry>,
139 <citerefentry><refentrytitle>textureGatherOffset
</refentrytitle></citerefentry>,
140 <citerefentry><refentrytitle>textureGatherOffsets
</refentrytitle></citerefentry>,
141 <citerefentry><refentrytitle>textureGrad
</refentrytitle></citerefentry>,
142 <citerefentry><refentrytitle>textureGradOffset
</refentrytitle></citerefentry>,
143 <citerefentry><refentrytitle>textureLod
</refentrytitle></citerefentry>,
144 <citerefentry><refentrytitle>textureLodOffset
</refentrytitle></citerefentry>,
145 <citerefentry><refentrytitle>textureOffset
</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>textureQueryLod
</refentrytitle></citerefentry>,
152 <citerefentry><refentrytitle>textureSize
</refentrytitle></citerefentry>
155 <refsect1 id=
"Copyright"><title>Copyright
</title>
157 Copyright
<trademark class=
"copyright"></trademark> 2011 Khronos Group.
158 This material may be distributed subject to the terms and conditions set forth in
159 the Open Publication License, v
1.0,
8 June
1999.
160 <ulink url=
"http://opencontent.org/openpub/">http://opencontent.org/openpub/
</ulink>.