Skip to content

Instantly share code, notes, and snippets.

@marklundin
Created February 13, 2017 18:09
Show Gist options
  • Save marklundin/ef6787f3422d318cb14519cd5a704c18 to your computer and use it in GitHub Desktop.
Save marklundin/ef6787f3422d318cb14519cd5a704c18 to your computer and use it in GitHub Desktop.
Basic transition
/*
GPGPU
*/
attr vec2 p; // current position
attr vec2 endP; // Final resting position in final image
/*
Animate this between 0 and 1
(0 == use curl movement) (1 == move towards endP)
*/
uniform float transition;
void main(){
vec2 nextCurlP = p + curl( p );
vec2 nextEndP = ( endP - p ) * 0.04;
gl_Position = mix( nextCurlP, nextEndP, transition);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment