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_indirect.sl < prev    next >
Encoding:
Text File  |  2008-01-23  |  590 b   |  27 lines

  1. /* indirect.sl - retrieve radiosity data from the "ray server"
  2.  * 
  3.  *
  4.  * The RenderMan (R) Interface Procedures and RIB Protocol are:
  5.  *     Copyright 1988, 1989, Pixar.  All rights reserved.
  6.  * RenderMan (R) is a registered trademark of Pixar.
  7.  *
  8.  * [REVIEW]
  9.  */
  10.  
  11. #include "k3d_rayserver.h"
  12.  
  13.  
  14. light k3d_indirect(output float __nonspecular = 1;)
  15. {
  16. /* PRMan - make a light that looks up from the ray server */
  17.  
  18.   /* Exploit the fact that PRMan (incorrectly) leaves the surface normal
  19.    * in N.
  20.    */
  21.   vector axis = normalize(N);
  22.   solar(-axis, 0)
  23.   {
  24.     Cl = rs_indirect(Ps, axis);
  25.   }
  26. }
  27.