Skip to content

Instantly share code, notes, and snippets.

@JuriaanGregor
Created June 9, 2020 22:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JuriaanGregor/887b85a3000e97c4485463648df33fa3 to your computer and use it in GitHub Desktop.
Save JuriaanGregor/887b85a3000e97c4485463648df33fa3 to your computer and use it in GitHub Desktop.
Splitscan for Isadora found on https://www.shadertoy.com/view/XdGcWK
// All credit to the original owner Hamoid
// Original url https://www.shadertoy.com/view/XdGcWK
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