aeon-199x/shaders/final.fsh

39 lines
603 B
Text
Raw Normal View History

#version 120
2024-04-18 00:22:26 -04:00
#include "/module/common.glsl"
//#define aberration
//#define hBlur
2024-04-20 22:13:24 -04:00
//#define scanlines
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"
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-04-20 22:13:24 -04:00
#ifdef scanlines
if(mod(int(gl_FragCoord.y / (pixelSize * 2)), 2) == 0)
color.rgb *= 0.95;
else
color.rgb /= 0.95;
#endif
2024-04-18 00:22:26 -04:00
gl_FragData[0] = vec4(color, 1);
}