Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- uniform sampler2D u_tex;
- uniform vec2 u_invRes;
- varying vec2 v_uv;
- float offset[3];
- float weight[3];
- void main() {
- offset[0] = 0.0; offset[1] = 1.3846153846; offset[2] = 3.2307692308;
- weight[0] = 0.2270270270; weight[1] = 0.3162162162; weight[2] = 0.0702702703;
- vec3 tc = texture2D(u_tex, v_uv).rgb * weight[0] * 2.0;
- for (int i = 1; i < 3; i++) {
- tc += weight[i] * texture2D(u_tex, v_uv + vec2(0.0, u_invRes.y * offset[i])).rgb;
- tc += weight[i] * texture2D(u_tex, v_uv - vec2(0.0, u_invRes.y * offset[i])).rgb;
- }
- gl_FragColor = vec4(tc, 1.0);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement