#version 410 uniform float blur; uniform float pixelsWidth; uniform float pixelsHeight; uniform sampler2D texture1; in vec2 uvV; out vec4 fragColor; void main (void) { float pixels = 1024.0; vec2 offset1 = vec2(0.0, 1.0 / pixelsWidth); vec4 p = texture(texture1, uvV); vec4 pa1 = texture(texture1, uvV + offset1); vec4 pa2 = texture(texture1, uvV + 2.0 * offset1); vec4 pa3 = texture(texture1, uvV + 3.0 * offset1); vec4 pb1 = texture(texture1, uvV - offset1); vec4 pb2 = texture(texture1, uvV - 2.0 * offset1); vec4 pb3 = texture(texture1, uvV - 3.0 * offset1); float amt2 = abs(blur); float divider = 3.0 + 6.0 * abs(amt2); vec4 q = 3.0 * p + amt2 * (pa1 + pa2 + pa3 + pb1 + pb2 + pb3); q = q / divider; q = abs(q); q.a = 1.0; fragColor = q; }