Skip to content

Instantly share code, notes, and snippets.

@CharStiles
Created May 25, 2020 20:52
Show Gist options
  • Save CharStiles/998617101d4529004babe5c4f3780256 to your computer and use it in GitHub Desktop.
Save CharStiles/998617101d4529004babe5c4f3780256 to your computer and use it in GitHub Desktop.
#ifdef GL_ES
precision highp float;
#endif
uniform float time;
uniform vec2 resolution;
uniform vec2 mouse;
uniform vec3 spectrum;
uniform sampler2D myPic;
uniform sampler2D texture1;
uniform sampler2D texture2;
uniform sampler2D texture3;
uniform sampler2D prevFrame;
uniform sampler2D prevPass;
varying vec3 v_normal;
varying vec2 v_texcoord;
void main(void)
{
vec2 coord = v_texcoord;
coord.x *= resolution.x/resolution.y;
coord += vec2(-0.5,0);
coord = vec2(coord.x,1.- coord.y);
coord *= (sin(time)+1.)*20.;
vec4 picPix = texture2D(myPic, coord);
gl_FragColor = picPix;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment