Skip to content

Instantly share code, notes, and snippets.

@i2pi
Created April 8, 2012 00:12
Show Gist options
  • Save i2pi/2333062 to your computer and use it in GitHub Desktop.
Save i2pi/2333062 to your computer and use it in GitHub Desktop.
ld += ldd;
if(ld>0.5f) ld -= 1.0f;
ldd += ledg * (lddd - ldd);
lde *= 0.99983f; //decay
tmp = lf + lm * lde;
if(tmp<0.0f) tmp=0.0f; else if(tmp>1.1f) tmp=1.1f; lf1 -= tmp * (lf0 + lq * lf1 + lde * ld);
lf0 += tmp * lf1;
tmp = 0.45f * lf0;
if(tmp>0.10f) tmp = 0.12f;
l += tmp;
d += 0.35f * tmp;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment