home *** CD-ROM | disk | FTP | other *** search
/ Chip 2000 August / chip_08_2000.iso / aktualnosci / shareware / Rhinoceros / rh11eval_20000320.exe / %MAINDIR% / RIB / rh_plastic.sl < prev    next >
Encoding:
Text File  |  2000-06-08  |  764 b   |  28 lines

  1. /* Custom Rhino plastic shader based on standard plastic shader.
  2.  * A custom name is used to make sure Rhino always finds it.
  3.  *
  4.  *
  5.  *
  6.  *
  7.  * plastic.sl - Standard plastic surface for RenderMan Interface.
  8.  * (c) Copyright 1988, Pixar.
  9.  *
  10.  * The RenderMan (R) Interface Procedures and RIB Protocol are:
  11.  *     Copyright 1988, 1989, Pixar.  All rights reserved.
  12.  * RenderMan (R) is a registered trademark of Pixar.
  13.  */
  14.  
  15.  
  16. surface
  17. rh_plastic (float Ka = 1;
  18.          float Kd = .5;
  19.          float Ks = .5;
  20.          float roughness = .1;
  21.      color specularcolor = 1;)
  22. {
  23.     normal Nf = faceforward (normalize(N),I);
  24.     Oi = Os;
  25.     Ci = Os * ( Cs * (Ka*ambient() + Kd*diffuse(Nf)) +
  26.         specularcolor * Ks*specular(Nf,-normalize(I),roughness));
  27. }
  28.