Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifdef GL_ES
- precision mediump float;
- #endif
- varying vec4 v_color;
- varying vec2 v_texCoords;
- uniform float smew;
- uniform sampler2D u_texture;
- vec2 distort(vec2 p) {
- float x = sin( 25.0*p.y + 30.0*p.x + 6.28) * 0.01;
- float y = sin( 25.0*p.y + 30.0*p.x + 6.28) * 0.01;
- return vec2(p.x + x, p.y + y);
- }
- void main()
- {
- float width = 0.2;
- vec4 color = v_color * texture2D(u_texture, distort(v_texCoords));
- if ((v_texCoords.x < v_texCoords.y + smew + width) && (v_texCoords.x > v_texCoords.y + smew - width)) {
- color *= 2.0;
- }
- gl_FragColor = color;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement