-
-
Save marklundin/ef6787f3422d318cb14519cd5a704c18 to your computer and use it in GitHub Desktop.
Basic transition
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
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