4e9581f4597fc7e58d8fa7399cd95e9ac002ee9a
[clinton/guile-figl.git] / upstream-man-pages / manglsl / textureProj.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="textureProj">
5 <refmeta>
6 <refmetainfo>
7 <copyright>
8 <year>2011</year>
9 <holder>Khronos Group</holder>
10 </copyright>
11 </refmetainfo>
12 <refentrytitle>textureProj</refentrytitle>
13 <manvolnum>3G</manvolnum>
14 </refmeta>
15 <refnamediv>
16 <refname>textureProj</refname>
17 <refpurpose>perform a texture lookup with projection</refpurpose>
18 </refnamediv>
19 <refsynopsisdiv><title>Declaration</title>
20 <funcsynopsis>
21 <funcprototype>
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>
26 </funcprototype>
27 <funcprototype>
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>
32 </funcprototype>
33 <funcprototype>
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>
38 </funcprototype>
39 <funcprototype>
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>
44 </funcprototype>
45 <funcprototype>
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>
50 </funcprototype>
51 <funcprototype>
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>
56 </funcprototype>
57 <funcprototype>
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>
62 </funcprototype>
63 <funcprototype>
64 <funcdef>gvec4 <function>textureProj</function></funcdef>
65 <paramdef>gsampler2DRect <parameter>sampler</parameter></paramdef>
66 <paramdef>vec3 <parameter>P</parameter></paramdef>
67 </funcprototype>
68 <funcprototype>
69 <funcdef>gvec4 <function>textureProj</function></funcdef>
70 <paramdef>gsampler2DRect <parameter>sampler</parameter></paramdef>
71 <paramdef>vec4 <parameter>P</parameter></paramdef>
72 </funcprototype>
73 <funcprototype>
74 <funcdef>float <function>textureProj</function></funcdef>
75 <paramdef>gsampler2DRectShadow <parameter>sampler</parameter></paramdef>
76 <paramdef>vec4 <parameter>P</parameter></paramdef>
77 </funcprototype>
78 </funcsynopsis>
79 </refsynopsisdiv>
80 <refsect1 id="parameters"><title>Parameters</title>
81 <variablelist>
82 <varlistentry>
83 <term><parameter>sampler</parameter></term>
84 <listitem>
85 <para>
86 Specifies the sampler to which the texture from which texels will be retrieved is bound.
87 </para>
88 </listitem>
89 </varlistentry>
90 <varlistentry>
91 <term><parameter>P</parameter></term>
92 <listitem>
93 <para>
94 Specifies the texture coordinates at which texture will be sampled.
95 </para>
96 </listitem>
97 </varlistentry>
98 <varlistentry>
99 <term><parameter>bias</parameter></term>
100 <listitem>
101 <para>
102 Specifies an optional bias to be applied during level-of-detail computation.
103 </para>
104 </listitem>
105 </varlistentry>
106 </variablelist>
107 </refsect1>
108 <refsect1 id="description"><title>Description</title>
109 <para>
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>.
116 </para>
117 </refsect1>
118 <refsect1 id="versions"><title>Version Support</title>
119 <informaltable frame="topbot">
120 #VARTABLECOLS#
121 <thead>
122 #FUNCTABLEHEADER#
123 <row>
124 <entry>textureProj</entry>#newin13#
125 </row>
126 <row>
127 <entry>textureProj (gsampler2DRect{Shadow})</entry>#newin14#
128 </row>
129 </thead>
130 </tgroup>
131 </informaltable>
132 </refsect1>
133 <refsect1 id="seealso"><title>See Also</title>
134 <para>
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>
153 </para>
154 </refsect1>
155 <refsect1 id="Copyright"><title>Copyright</title>
156 <para>
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>.
161 </para>
162 </refsect1>
163 </refentry>