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

  1. light k3d_distant_shadow(
  2.     float  intensity=1 ;
  3.     color  lightcolor=1 ;
  4.     point from = point "shader" (0,0,0) ;
  5.     point to   = point "shader" (0,0,1) ;
  6.     string shadowname="";
  7.     float  samples=16;
  8.     float  blur=.01;
  9.     float  bias=.01;
  10.     )
  11. {
  12.     solar(to - from, 0.0)
  13.     {
  14.         Cl = intensity * lightcolor;
  15.  
  16.         if(shadowname != "")
  17.         {
  18.             Cl *= 1 - shadow(shadowname, Ps, "samples", samples, "blur", blur, "bias", bias);
  19.         }
  20.  
  21.     }
  22. }
  23.  
  24.