26.01.2015 Views

The RenderMan Interface - Paul Bourke

The RenderMan Interface - Paul Bourke

The RenderMan Interface - Paul Bourke

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Appendix A<br />

STANDARD RENDERMAN INTERFACE SHADERS<br />

In this section the required <strong>RenderMan</strong> <strong>Interface</strong> shaders are defined.<br />

A.1 Null Shader<br />

This shader does nothing and is intended to be a placeholder if no action is to be performed.<br />

<strong>The</strong>re is a null shader for every class of shader.<br />

A.2 Surface Shaders<br />

A.2.1<br />

Constant surface<br />

surface<br />

constant()<br />

{<br />

Oi = Os;<br />

Ci = Os * Cs;<br />

}<br />

A.2.2<br />

Matte surface<br />

surface<br />

matte(<br />

float Ka = 1;<br />

float Kd = 1;)<br />

{<br />

normal Nf = faceforward(normalize(N), I);<br />

Oi = Os;<br />

Ci = Os * Cs * (Ka*ambient() + Kd*diffuse(Nf));<br />

}<br />

155

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!