Skip to content

Instantly share code, notes, and snippets.

@teoyoung
Created March 15, 2019 14:50
Show Gist options
  • Save teoyoung/cd09cf6f3017fd5f525a9be43ef400c0 to your computer and use it in GitHub Desktop.
Save teoyoung/cd09cf6f3017fd5f525a9be43ef400c0 to your computer and use it in GitHub Desktop.
GLSL
vec3 anim( float t, vec3 s, vec3 e){
// Добавил небольшую паузу перед стартом
float X = (1.0-t)*rand( vec2(s.y,e.z )) + t * 1.0;
t = t*X;
//
float x = pow((1.0-t), 2.) * s.x + 2. * (1. - t) * t * rand( vec2(s.y,e.z )) + pow( t, 2.) * e.x;
float y = pow((1.0-t), 2.) * s.y + 2. * (1. - t) * t * rand( vec2(s.x,e.z )) + pow( t, 2.) * e.y;
float z = pow((1.0-t), 2.) * s.z + 2. * (1. - t) * t * rand( vec2(s.y,e.x )) + pow( t, 2.) * e.z;
return vec3(x, y, z);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment