aeon-199x/shaders/final.fsh

36 lines
536 B
Text
Raw Normal View History

#version 120
2024-04-18 00:22:26 -04:00
#include "/module/common.glsl"
//#define aberration
//#define hBlur
varying vec2 texcoord;
uniform sampler2D gcolor;
uniform float viewWidth;
2024-04-18 00:22:26 -04:00
#include "/module/aberration.frag"
2024-04-17 10:54:58 -04:00
#include "/module/horizontal_blur.frag"
2024-05-03 22:08:09 -04:00
#include "/module/scanline.frag"
void main() {
2024-04-18 00:22:26 -04:00
vec3 color;
2024-04-17 11:20:09 -04:00
#ifdef hBlur
2024-04-18 00:22:26 -04:00
color = hblur();
2024-04-17 10:54:58 -04:00
#else
2024-04-18 00:22:26 -04:00
color = texture2D(gcolor, texcoord).rgb;
#endif
#ifdef aberration
color.rb = aberrate().rb;
2024-04-17 10:54:58 -04:00
#endif
2024-04-18 00:22:26 -04:00
2024-05-03 22:08:09 -04:00
#if scanline > 0
color = scanlines(color);
2024-04-20 22:13:24 -04:00
#endif
2024-04-18 00:22:26 -04:00
gl_FragData[0] = vec4(color, 1);
}