Welcome, Guest.
Username: Password: Remember me

TOPIC: FXAA Parameter Confusion

FXAA Parameter Confusion 10 months 1 week ago #1

  • mathusummut
  • mathusummut's Avatar
  • Offline
  • Electronic Dance Music producer and enthisast.
  • Posts: 1
I have a question about the popular FXAA shaders that are out there written using HLSL or GLSL, such as:
https://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: 10 months 1 week ago by mathusummut.
The administrator has disabled public write access.

FXAA Parameter Confusion 10 months 1 week ago #2

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: 10 months 1 week ago by kingeric1992.
The administrator has disabled public write access.
The following user(s) said Thank You: mathusummut