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_clay.sl < prev    next >
Encoding:
Text File  |  2008-01-23  |  596 b   |  20 lines

  1. /************************************************************************
  2.  * clay.sl -- simple clay surface using MaterialClay
  3.  *
  4.  * Author: Larry Gritz (gritzl@acm.org)
  5.  *
  6.  * Reference:
  7.  *   _Advanced RenderMan: Creating CGI for Motion Picture_, 
  8.  *   by Anthony A. Apodaca and Larry Gritz, Morgan Kaufmann, 1999.
  9.  ************************************************************************/
  10.  
  11. #include "k3d_material.h"
  12.  
  13. surface k3d_clay(float Ka = 1, Kd = 0.7, roughness = 0.1;)
  14. {
  15.   normal Nf = faceforward(normalize(N), I);
  16.   Ci = MaterialClay(Nf, Cs, Ka, Kd, roughness);
  17.   Oi = Os;
  18.   Ci *= Oi;
  19. }
  20.