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_hdri2.sl < prev    next >
Encoding:
Text File  |  2008-01-23  |  612 b   |  22 lines

  1. light 
  2. k3d_hdri2 (float intensity = 1;
  3.        color lightcolor = 1;
  4.        string envname = "";
  5.        string envspace = "world";
  6.        float envblur = 0.5;
  7.        string shadowname = "";
  8.        float shadowblur = 0.001;
  9.        float shadowbias = 0.01;
  10.        float shadowsamples = 1;)
  11. {
  12.     vector Lenv = vtransform (envspace, P-Ps);
  13.     illuminate (P) {
  14.     if (envname != "")
  15.         Cl = environment (envname, Lenv, "blur", envblur);
  16.     else Cl = 0;
  17.         if (shadowname != "")
  18.             Cl *= 1 - color shadow (shadowname, Ps, "samples", shadowsamples,
  19.                     "blur", shadowblur, "bias", shadowbias);
  20.     }
  21. }
  22.