~ubuntu-branches/ubuntu/breezy/aqsis/breezy

« back to all changes in this revision

Viewing changes to shaders/randgrid.sl

  • Committer: Bazaar Package Importer
  • Author(s): Will Newton
  • Date: 2004-12-07 20:06:49 UTC
  • Revision ID: james.westby@ubuntu.com-20041207200649-fccswkrvp4oc8lmn
Tags: upstream-0.9.3
ImportĀ upstreamĀ versionĀ 0.9.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* randgrid.sl - Debug test surface for RenderMan Interface.
 
2
 *                               Based on standard plastic shader with a random colour for
 
3
 *                               each micropolygon grid.
 
4
 */
 
5
 
 
6
 
 
7
surface
 
8
randgrid (float Ka = 1;
 
9
          float Kd = .5;
 
10
          float Ks = .5;
 
11
          float roughness = .1;
 
12
                  color specularcolor = 1;)
 
13
{
 
14
        uniform color c;
 
15
 
 
16
        point Nf = faceforward (normalize(N),I);
 
17
 
 
18
        c=color(random(),random(),random());
 
19
 
 
20
    Oi = Os;
 
21
    Ci = Os * ( c * (Ka*ambient() + Kd*diffuse(Nf)) +
 
22
                specularcolor * Ks*specular(Nf,-normalize(I),roughness));
 
23
}
 
24