SHARE
TWEET

Untitled

a guest Oct 17th, 2014 106 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2.             temp = $POS$-IN_pWorld;
  3.             lightDir = normalize(temp);
  4.      
  5.             dotNL = saturate(dot(normal, lightDir));
  6.      
  7.             falloff = min( 1.0/dot(temp,temp), 1.0 );
  8.      
  9.             diff += dotNL * $COLOR$ * falloff * shadow;
  10.      
  11.             temp.x = BlinnPhong(lightDir, viewVec, normal, specPow, dotNL) * falloff;
  12.             temp.x = saturate(temp.x*shadow);
  13.             refl = mix(refl, $COLOR$, temp.x);
  14.             shadow = 1.0;
RAW Paste Data
Top