rename upstream-man-pages to upstream-doc
[clinton/guile-figl.git] / upstream-doc / manglsl / fwidth.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="fwidth">
5 <refmeta>
6 <refmetainfo>
7 <copyright>
8 <year>2011</year>
9 <holder>Khronos Group</holder>
10 </copyright>
11 </refmetainfo>
12 <refentrytitle>fwidth</refentrytitle>
13 <manvolnum>3G</manvolnum>
14 </refmeta>
15 <refnamediv>
16 <refname>fwidth</refname>
17 <refpurpose>return the sum of the absolute derivatives in x and y</refpurpose>
18 </refnamediv>
19 <refsynopsisdiv><title>Declaration</title>
20 <funcsynopsis>
21 <funcprototype>
22 <funcdef>genType <function>fwidth</function></funcdef>
23 <paramdef>genType <parameter>p</parameter></paramdef>
24 </funcprototype>
25 </funcsynopsis>
26 </refsynopsisdiv>
27 <refsect1 id="parameters"><title>Parameters</title>
28 <variablelist>
29 <varlistentry>
30 <term><parameter>p</parameter></term>
31 <listitem>
32 <para>
33 Specifies the expression of which to take the partial derivative.
34 </para>
35 </listitem>
36 </varlistentry>
37 </variablelist>
38 </refsect1>
39 <refsect1 id="description"><title>Description</title>
40 <para>
41 <emphasis>Available only in the fragment shader</emphasis>, <function>fwidth</function> returns the sum of
42 the absolute derivatives in x and y using local differencing for the input argument <parameter>p</parameter>.
43 It is equivalent to <code><citerefentry><refentrytitle>abs</refentrytitle></citerefentry>(<citerefentry><refentrytitle>dFdx</refentrytitle></citerefentry>(p)) + <citerefentry><refentrytitle>abs</refentrytitle></citerefentry>(<citerefentry><refentrytitle>dFdy</refentrytitle></citerefentry>(p))</code>.
44 </para>
45 </refsect1>
46 <refsect1 id="versions"><title>Version Support</title>
47 <informaltable frame="topbot">
48 #VARTABLECOLS#
49 <thead>
50 #FUNCTABLEHEADER#
51 <row>
52 <entry>fwidth</entry>#newin11#
53 </row>
54 </thead>
55 </tgroup>
56 </informaltable>
57 </refsect1>
58 <refsect1 id="seealso"><title>See Also</title>
59 <para>
60 <citerefentry><refentrytitle>dFdx</refentrytitle></citerefentry>,
61 <citerefentry><refentrytitle>dFdy</refentrytitle></citerefentry>
62 </para>
63 </refsect1>
64 <refsect1 id="Copyright"><title>Copyright</title>
65 <para>
66 Copyright <trademark class="copyright"></trademark> 2011 Khronos Group.
67 This material may be distributed subject to the terms and conditions set forth in
68 the Open Publication License, v 1.0, 8 June 1999.
69 <ulink url="http://opencontent.org/openpub/">http://opencontent.org/openpub/</ulink>.
70 </para>
71 </refsect1>
72 </refentry>