Skip to content

Instantly share code, notes, and snippets.

Created June 9, 2020 22:46
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Splitscan for Isadora found on
// All credit to the original owner Hamoid
// Original url
uniform float time;
uniform vec2 mouse;
uniform vec2 resolution;
uniform sampler2D tex0;
void main(void) {
vec2 uv = gl_FragCoord.xy /resolution.xy;
float a = texture2D(tex0, vec2(0.5, time * 0.001)).r;
// 2D rotation of "a" radians
float nx = uv.x * cos(a) - uv.y * sin(a);
float ny = uv.x * sin(a) + uv.y * cos(a);
vec3 col = texture2D(tex0, vec2(nx, time * 0.01 + ny * 0.01)).rgb;
gl_FragColor = vec4(col.bgr, 1.0);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment