mib_texture_filter_lookup

 
 
 

Category: mental ray > Texture

Shader Family: Texture

Output: Color

This shader looks up the texture image using elliptical filtering.

See Texture Shaders for more information.

Name

The name of the shader node displayed in the render tree. Enter any name you like, or leave the default.

tex

Displays the texture map (connected in the texture parameter port) to be looked up. It must be a texture image, not a texture shader; otherwise the texture is looked up unfiltered.

You can Edit the image clip, or get a New image clip from file or from source. For more information about working with images, see Managing Image Sources & Clips [Data Exchange].

coord

The central texture sampling location.

eccmax

The maximum allowed eccentricity for the ellipse.

maxminor

The maximum number of texture pixels for the minor radius of the ellipse.

disc_r

Used in the calculation of screen-to-texture space transformations. A default value of 0.3 is used if disc_r is 0 or unspecified. For scenes with highly curved surfaces, it may be useful to choose a value in the range [0.0...0.3] if aliasing artifacts appear.

bilinear

Enables bilinear interpolation of texture samples. This blurs magnified areas and avoids blocky artifacts.

space

The texture space index in the range [0...63].

remap

A shader that is called for remapping additional texture coordinates.

The shader calls mi_texture_filter_project with the given space parameter to obtain three corresponding points in raster and texture space. These three texture coordinates are remapped by calling the specified remap shader; the actual texture coordinate for remapping is passed as the fourth argument of mi_call_shader_x (which means that the called shader must be designed to check its fourth argument). The remapping shader must use it instead of the provided texture coordinate vector in the shader parameters.

The projection transformation matrix required by the filtered texture lookup is calculated by calling the mi_texture_filter_transform shader interface function, using the three raster space and remapped texture space coordinates. The translation component in the matrix is set to coord. Note that the projection transformation is always calculated for the current raster position, but it is possible to translate the ellipse in texture space using coord. This is useful for bump mapping.

This is basically a front end to the mi_lookup_filter_color_texture family of shader interface functions. The elliptical filter parameter bilinear is set to false in mib_texture_filter_lookup, and for circle_radius the default value is used.

If the projection matrix cannot be calculated properly, or the texture is a shader instead of an image, or the reflection level is not zero, non-filtered texture lookup is used.

Creative Commons License Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License