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">
9 <holder>Khronos Group
</holder>
12 <refentrytitle>fwidth
</refentrytitle>
13 <manvolnum>3G
</manvolnum>
16 <refname>fwidth
</refname>
17 <refpurpose>return the sum of the absolute derivatives in x and y
</refpurpose>
19 <refsynopsisdiv><title>Declaration
</title>
22 <funcdef>genType
<function>fwidth
</function></funcdef>
23 <paramdef>genType
<parameter>p
</parameter></paramdef>
27 <refsect1 id=
"parameters"><title>Parameters
</title>
30 <term><parameter>p
</parameter></term>
33 Specifies the expression of which to take the partial derivative.
39 <refsect1 id=
"description"><title>Description
</title>
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>.
46 <refsect1 id=
"versions"><title>Version Support
</title>
47 <informaltable frame=
"topbot">
52 <entry>fwidth
</entry>#newin11#
58 <refsect1 id=
"seealso"><title>See Also
</title>
60 <citerefentry><refentrytitle>dFdx
</refentrytitle></citerefentry>,
61 <citerefentry><refentrytitle>dFdy
</refentrytitle></citerefentry>
64 <refsect1 id=
"Copyright"><title>Copyright
</title>
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>.