Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

day 014

No Interactions for this one
[project link](

three.js, GLSL


Endless insatiable, blinding me sweetly

learned today

Feb 22th 2017

Practicing shaping functions to get control of transit effect using mix ( )

Main Functions in this code

  • impulse is a shaping function to create certain curve

float impulse( float k, float x ){
    float h = k*x;
    return h*exp(1.0-h);
  • Using mix( ) to mix between rect distance field and circle distance field get us a smooth transition between these two shapes

//use impluse shaping function to detemine the speed/shape of how it transit bt circle and rect
float sdf = mix(c,r,impulse(12.,abs(sin(t))));
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.