blob: b7b42525818253fa9e52340948af52b62283cbca (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
uniform sampler2D texture;
uniform float iTime;
void main() {
vec2 uv = gl_TexCoord[0].xy;
float sine = sin(uv.x*24.0 - iTime*7.0);
float offset = sine*0.04;
uv.x -= 0.25;
uv.x += offset*0.5*uv.x;
uv.y += offset*uv.x*2.0 - 0.25;
vec4 col = texture2D(texture, uv*2.0);
col.rgb *= 0.9;
col.rgb += (0.1 * sine*(uv.x*2.0));
if(uv.x < 0.0 || uv.x > 0.5 || uv.y < 0.0 || uv.y > 0.5)
col.a = 0.0;
gl_FragColor = col;
}
|