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...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

15.7.3 Shadow depth maps<br />

Shadow depth maps are z-buffer images as seen from a particular view point. Normally a<br />

shadow map is associated with a light source and represents a depth buffer rendered from<br />

the point of view of the light source. <strong>The</strong> texture coordinate of a shadow map is a point.<br />

<strong>The</strong> value returned is the fraction of points on the shaded surface that are farther from the<br />

light than the surface recorded in the depth map. A value of 1 indicates that the surface is<br />

completely in shadow and a value of 0 indicates that the surface is completely illuminated<br />

by the light source.<br />

float shadow( string name[channel]; texture coordinates[, parameterlist] )<br />

where texture coordinates is one of the following:<br />

point P;<br />

point P1, P2, P3, P4;<br />

Return the shadow value from a shadow depth map. <strong>The</strong> name is the name of the<br />

texture map created using RiMakeShadow. <strong>The</strong> channel selector is optional; if it is<br />

not present, the brackets are also omitted and channel 0 is assumed. channel selects<br />

the starting channel in the texture. Only one channel of a shadow map is ever accessed.<br />

texture coordinates are points in the coordinate system in which the depth<br />

map was created. parameterlist is a list of name-value pairs that allow greater control<br />

over texture access.<br />

15.7.4 Getting Information About Texture Maps<br />

float textureinfo ( string texturename, dataname; output type variable )<br />

Returns data that about a particular texture map, specified by the file name texturename.<br />

<strong>The</strong> dataname specifies the piece of information that will be returned in variable.<br />

<strong>The</strong> dataname is known to the renderer and its type and storage class match<br />

that of variable, the named data will be written into variable and textureinfo() will<br />

return a value of 1.0. If the data is unknown or the types do not match, variable will<br />

be unchanged and textureinfo() will return 0.0. Note that textureinfo data is always<br />

uniform. If variable is varying, the appropriate uniform-to-varying conversion will<br />

take place.<br />

<strong>The</strong> standard data names supported by textureinfo are listed in Table 15.3. A particular<br />

implementation may support additional textureinfo queries.<br />

15.8 Message Passing and Information Functions<br />

float atmosphere( string paramname; output type variable )<br />

float displacement( string paramname; output type variable )<br />

float lightsource( string paramname; output type variable )<br />

float surface( string paramname; output type variable )<br />

146

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

Saved successfully!

Ooh no, something went wrong!