1
/* randgrid.sl - Debug test surface for RenderMan Interface.
2
* Based on standard plastic shader with a random colour for
3
* each micropolygon grid.
8
randgrid (float Ka = 1;
12
color specularcolor = 1;)
16
point Nf = faceforward (normalize(N),I);
18
c=color(random(),random(),random());
21
Ci = Os * ( c * (Ka*ambient() + Kd*diffuse(Nf)) +
22
specularcolor * Ks*specular(Nf,-normalize(I),roughness));