Guest User

Untitled

a guest
Jan 12th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. uniform float scale_factor;
  2. uniform sampler2D tex;
  3. in vec2 pass_TexCoord;
  4. void main()
  5. {
  6.     float scan_color = 2.0 * abs(mod((gl_FragCoord.y + 0.5) / scale_factor * 2.0, 2.0) - 1.0);
  7.     vec3 pixel = texture2D(tex, pass_TexCoord).rgb;
  8.     pixel = (pixel - 0.5) * 1.035 + 0.5;
  9.     pixel = pixel * (pixel + (scan_color * (1.0 - pixel)));
  10.     pixel = (pixel + 0.5) * 1.035 - 0.5;
  11.     gl_FragColor = vec4(pixel, texture2D(tex, pass_TexCoord).a);
  12. };
Add Comment
Please, Sign In to add comment