Advertisement
Guest User

Untitled

a guest
Oct 17th, 2014
649
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  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;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement