R2 Shaders
R2FXAA.h
Go to the documentation of this file.
1 #ifndef R2_FXAA_H
2 #define R2_FXAA_H
3 
4 /// \file R2FXAA.h
5 /// \brief FXAA fragment shader
6 
7 /// FXAA parameters
8 
9 struct R2_fxaa_t {
10 
11  /// Input color texture.
12  sampler2D image;
13 
14  /// The inverse width/height of the viewport
16 
17  /// The amount of subpixel aliasing removal.
18  /// The range of useful values is `[0.0, 1.0]`, where:
19  /// `1.00` - upper limit (softer)
20  /// `0.75` - default amount of filtering
21  /// `0.50` - lower limit (sharper, less sub-pixel aliasing removal)
22  /// `0.25` - almost off
23  /// `0.00` - completely off
25 
26  /// The minimum amount of local contrast required to apply the algorithm.
27  /// The range of useful values is `[0.063, 0.333]`, where:
28  /// `0.333` - too little (faster)
29  /// `0.250` - low quality
30  /// `0.166` - default
31  /// `0.125` - high quality
32  /// `0.063` - overkill (slower)
34 
35  /// Trims the algorithm from processing darks.
36  /// The range of useful values is `[0.0312, 0.0833]`, where:
37  /// `0.0833` - upper limit (default, the start of visible unfiltered edges)
38  /// `0.0625` - high quality (faster)
39  /// `0.0312` - visible limit (slower)
41 };
42 
43 #ifndef R2_FXAA_PRESET
44 #error "Must define R2_FXAA_PRESET before including R2FXAA.h"
45 #endif
46 
47 #define FXAA_PC 1
48 #define FXAA_GREEN_AS_LUMA 1
49 #define FXAA_GLSL_130 1
50 #define FXAA_QUALITY__PRESET R2_FXAA_PRESET
51 
52 #include "Fxaa3_11.h"
53 
54 #endif // R2_FXAA_H
float edge_threshold
Definition: R2FXAA.h:33
vec2 screen_inverse
The inverse width/height of the viewport.
Definition: R2FXAA.h:15
sampler2D image
Input color texture.
Definition: R2FXAA.h:12
float subpixel_aliasing_removal
Definition: R2FXAA.h:24
float edge_threshold_minimum
Definition: R2FXAA.h:40
FXAA parameters.
Definition: R2FXAA.h:9