FXAA Parameter Confusion

  • mathusummut
  • Topic Author
More
8 years 2 months ago - 8 years 2 months ago #1 by mathusummut FXAA Parameter Confusion was created by mathusummut
I have a question about the popular FXAA shaders that are out there written using HLSL or GLSL, such as:
github.com/mattdesl/glsl-fxaa/blob/master/fxaa.glsl

Most of them mainly feature these three parameters:
    #define FXAA_REDUCE_MIN (1.0 / 128.0)  //0.0078125
    #define FXAA_REDUCE_MUL (1.0 / 8.0)  //0.125
    #define FXAA_SPAN_MAX 8.0

I looked all over the Internet, but could not find a proper explanation about the function of these three parameters. Can anyone help?
Last edit: 8 years 2 months ago by mathusummut.

Please Log in or Create an account to join the conversation.

  • kingeric1992
More
8 years 2 months ago - 8 years 2 months ago #2 by kingeric1992 Replied by kingeric1992 on topic FXAA Parameter Confusion
the inquired algorithm performs 1D sampling on direction perpendicular to luminance gradient with varying range with following behavior:

reduce sample range by nearby sum with scale factor defined by

FXAA_REDUCE_MUL: reduce scale multiplier
and
FXAA_REDUCE_MIN : minimum reduce scale

after that, FXAA_SPAN_MAX will force clamp the sample range.

as the out come, the sampling vector (A, B ) will be characterize as (A', B') with min(A', B') < 1, and if |A - B| < scale factor, max(A', B') will also be less then 1, that == no blurring.
Last edit: 8 years 2 months ago by kingeric1992.
The following user(s) said Thank You: mathusummut

Please Log in or Create an account to join the conversation.

We use cookies
We use cookies on our website. Some of them are essential for the operation of the forum. You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.