mirror of
https://github.com/cyberboy666/r_e_c_u_r.git
synced 2025-12-05 16:00:06 +01:00
36 lines
619 B
GLSL
36 lines
619 B
GLSL
//1-input
|
|
//written by Tim Caldwell
|
|
#ifdef GL_ES
|
|
precision mediump float;
|
|
#endif
|
|
|
|
varying vec2 v_texcoord;
|
|
uniform sampler2D u_tex0;
|
|
uniform vec2 u_resolution;
|
|
uniform float u_time;
|
|
uniform float u_x0;
|
|
uniform float u_x1;
|
|
uniform float u_x2;
|
|
uniform float u_x3;
|
|
|
|
|
|
void main(){
|
|
|
|
vec2 pos = v_texcoord;
|
|
//float amp = pos.y * 0.03 + .001;
|
|
pos.x += 0.07*u_x2*sin( pos.y* 70.0*u_x3 + u_time * 1.0 );
|
|
pos.y += 0.07*u_x0*sin( pos.x* 70.0*u_x1 + u_time * 1.0);
|
|
pos.y = mod(pos.y,1.0);
|
|
pos.x = mod(pos.x,1.0);
|
|
//if(pos.y > 1.0 || pos.y < 0.0){pos.y = 0.0;}
|
|
|
|
vec4 color = texture2D(u_tex0, pos);
|
|
|
|
gl_FragColor = color;
|
|
|
|
|
|
}
|
|
|
|
|
|
|