34 -1.0 * texture(tex, uv + vec2(-offset.x, -offset.y)).r
35 + -2.0 * texture(tex, uv + vec2(-offset.x, 0.0)).r
36 + -1.0 * texture(tex, uv + vec2(-offset.x, offset.y)).r
37 + 1.0 * texture(tex, uv + vec2(offset.x, -offset.y)).r
38 + 2.0 * texture(tex, uv + vec2(offset.x, 0.0)).r
39 + 1.0 * texture(tex, uv + vec2(offset.x, offset.y)).r;
42 -1.0 * texture(tex, uv + vec2(-offset.x, -offset.y)).r
43 + -2.0 * texture(tex, uv + vec2(0.0, -offset.y)).r
44 + -1.0 * texture(tex, uv + vec2(offset.x, -offset.y)).r
45 + 1.0 * texture(tex, uv + vec2(-offset.x, offset.y)).r
46 + 2.0 * texture(tex, uv + vec2(0.0, offset.y)).r
47 + 1.0 * texture(tex, uv + vec2(offset.x, offset.y)).r;
49 float edge = sqrt(gx * gx + gy * gy);
50 float threshold = 0.3;
51 vec3 color = (edge > threshold) ? vec3(1.0) : vec3(0.0);