logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

fwidth - return the sum of the absolute value of derivatives in x and y

Declaration

genTypefwidth(genTypep);genTypefwidthCoarse(genTypep);genTypefwidthFine(genTypep);

Description

Availableonlyinthefragmentshader, these functions return the sum of the absolute derivatives in $x$
       and $y$ using local differencing for the input argument p.  fwidth is equivalent to abs(dFdx(p)) +
       abs(dFdy(p)).  fwidthCoarse is equivalent to abs(dFdxCoarse(p)) + abs(dFdyCoarse(p)).  fwidthFine is
       equivalent to abs(dFdxFine(p)) + abs(dFdyFine(p)).

Name

       fwidth - return the sum of the absolute value of derivatives in x and y

Parameters

p
           Specifies the expression of which to take the partial derivative.

See Also

dFdx()

Version Support

       ┌───────────────┬───────────────────────────────────────────────────────────────────────────────────┐
       │               │        OpenGLShadingLanguageVersion                                            │
       ├───────────────┼──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┤
       │ Function1.101.201.301.401.503.304.004.104.204.304.404.50 │
       │ Name          │      │      │      │      │      │      │      │      │      │      │      │      │
       ├───────────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
       │ fwidth        │  ✔   │  ✔   │  ✔   │  ✔   │  ✔   │  ✔   │  ✔   │  ✔   │  ✔   │  ✔   │  ✔   │  ✔   │
       ├───────────────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤
       │ fwidthCoarse, │  -   │  -   │  -   │  -   │  -   │  -   │  -   │  -   │  -   │  -   │  -   │  ✔   │
       │ fwidthFine    │      │      │      │      │      │      │      │      │      │      │      │      │
       └───────────────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┘

See Also