home *** CD-ROM | disk | FTP | other *** search
/ Stone Design / Stone Design.iso / Stone_Friends / Wave / WavesWorld / Source / Shaders / RCShaders / RCEmboss.sl < prev    next >
Encoding:
Text File  |  1995-03-22  |  266 b   |  14 lines

  1. /* Listing 16.36  Displacement shader embossing a surface using a texture*/
  2. /* 
  3.  */
  4. displacement
  5. RCEmboss(    
  6.     float    Km        = .05;
  7.     string    texturename    = "")
  8. {
  9.     if( texturename != "") {
  10.         P -= Km * texture(texturename, s, t) * normalize(N);
  11.         N = calculatenormal(P);
  12.     }
  13. }
  14.