home *** CD-ROM | disk | FTP | other *** search
/ Hackers Magazine 57 / CdHackersMagazineNr57.iso / Software / Multimedia / k3d-setup-0.7.11.0.exe / share / k3d / shaders / surface / k3d_fill.sl < prev    next >
Encoding:
Text File  |  2008-01-23  |  317 b   |  15 lines

  1. /*IDfill written by Ivan DeWolf
  2.  *simple toon fill shader with shadows
  3.  *compare this to plastic.sl
  4.  */
  5. surface 
  6. k3d_fill( 
  7.     float    Kd            =   1, 
  8.         Ka            =  .7,
  9.         min            =   0.05,
  10.         max            =   0.055)
  11. {
  12.     normal Nf = faceforward(normalize(N), I );
  13.     Ci = Cs * (Ka*ambient() + Kd*(smoothstep(min,max,comp(diffuse(Nf),0))));
  14. }
  15.