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.

prevent aliasing. If one set of texture coordinates is given to the access function, the texture<br />

will be filtered over the area of the surface element being shaded (see the Shading<br />

Rate section in Part I). Four sets of texture coordinates can also be given to the access procedure,<br />

in which case the texture is filtered over the quadrilateral determined by those<br />

four points. <strong>The</strong> quality of texture antialiasing is controlled in the same way as spatial<br />

antialiasing. Parameters control how true the answer is, the effective number of samples<br />

used before filtering, and the type and width of the filter used. For this to be done properly<br />

(since texture maps are normally prefiltered), these filtering parameters are best given to<br />

the appropriate RiMake... procedure. For flexibility, however, they can also be changed at<br />

access time. Table 15.1, Texture Access Parameters gives the standard parameters to all the<br />

texture access functions; particular implementations may have additional parameters. If a<br />

parameter is encountered by an implementation that does not support its functionality, it<br />

should be ignored.<br />

Name Type Description<br />

”blur” varying float Specifies an additional area to be added to the texture area<br />

filtered in both the s and t directions, expressed in units of<br />

texture coordinates. A value of 1.0 would request that the<br />

entire texture file be blurred into the result. A value of<br />

0.001 would request that one extra texture pixel be added<br />

in the case of a one-thousand by one-thousand texture file.<br />

”sblur” varying float Specifies ”blur” individually in the s direction.<br />

”tblur” varying float Specifies ”blur” individually in the t direction.<br />

”width” uniform float This value multiplies the width of the area being filtered<br />

over in both the s and t directions. A value of 0 effectively<br />

turns off texture antialiasing. <strong>The</strong> default value is 1.0.<br />

”swidth” uniform float Specifies ”width” individually in the s direction.<br />

”twidth” uniform float Specifies ”width” individually in the t direction.<br />

”filter” uniform string Specifies the name of the filter to use for filtering over an<br />

area of the texture. <strong>The</strong> default is ”box”. Individual implementations<br />

may allow additional filters.<br />

”fill” uniform float Specifies the value to be provided for channels requested<br />

that are not present in the texture file. This is most often<br />

useful for a shader that knows how to use a texture containing<br />

an alpha channel. If no alpha channel is present in<br />

the texture file, the texture system quietly provides a default<br />

value of 0.0 to requests for the alpha value resulting<br />

in a completely tranparent texture. Such a shader could<br />

provide its own ”fill” value of 1.0 so that textures without<br />

an alpha channel would be opaque by default.<br />

Table 15.1: Texture and Environment Map Access Parameters<br />

144

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

Saved successfully!

Ooh no, something went wrong!