R2 Core Shaders

R2FXAAFragment.h
Go to the documentation of this file.
1 #ifndef R2FXAA_FRAGMENT_H
2 #define R2FXAA_FRAGMENT_H
3
4 /// \file R2FXAAFragment.h
5 /// \brief FXAA fragment shader
6
7 #include "R2FXAA.h"
8
9 in vec2 R2_uv;
10
11 uniform R2_fxaa_t R2_fxaa;
12
13 layout(location = 0) out vec4 R2_out;
14
15 void
16 main (void)
17 {
18 R2_out = FxaaPixelShader(
19 R2_uv,
20 vec4 (0.0), // Unused "fxaaConsolePosPos" parameter
21 R2_fxaa.image,
22 R2_fxaa.image, // Unused "fxaaConsole360TexExpBiasNegOne" parameter
23 R2_fxaa.image, // Unused "fxaaConsole360TexExpBiasNegTwo" parameter
24 R2_fxaa.screen_inverse,
25 vec4 (0.0), // Unused "fxaaConsoleRcpFrameOpt" parameter
26 vec4 (0.0), // Unused "fxaaConsoleRcpFrameOpt2" parameter
27 vec4 (0.0), // Unused "fxaaConsole360RcpFrameOpt2" parameter
28 R2_fxaa.subpixel_aliasing_removal,
29 R2_fxaa.edge_threshold,
30 R2_fxaa.edge_threshold_minimum,
31 0.0, // Unused "fxaaConsoleEdgeSharpness" parameter
32 0.0, // Unused "fxaaConsoleEdgeThreshold" parameter
33 0.0, // Unused "fxaaConsoleEdgeThresholdMin" parameter
34 vec4 (0.0) // Unused "fxaaConsole360ConstDir" parameter
35 );
36 }
37
38 #endif // R2FXAA_FRAGMENT_H
R2_fxaa_t::edge_threshold
float edge_threshold
Definition: R2FXAA.h:33
R2_fxaa_t::screen_inverse
vec2 screen_inverse
The inverse width/height of the viewport.
Definition: R2FXAA.h:15
layout
layout(location=0) in vec3 R2_vertex_world_position
World-space position.
R2_fxaa_t::image
sampler2D image
Input color texture.
Definition: R2FXAA.h:12
R2FXAA.h
FXAA fragment shader.
R2_fxaa_t::subpixel_aliasing_removal
float subpixel_aliasing_removal
Definition: R2FXAA.h:24
R2_fxaa_t::edge_threshold_minimum
float edge_threshold_minimum
Definition: R2FXAA.h:40
R2_fxaa_t
FXAA parameters.
Definition: R2FXAA.h:9