Instance Property

mipFilter

Texture filtering for using mipmaps to render the material property’s image contents at a size smaller than that of the original image.

Declaration

@property(nonatomic) SCNFilterMode mipFilter;

Discussion

Mipmapping is a technique that can increase rendering performance when rendering a texture image at smaller sizes. SceneKit automatically creates several mipmap levels for the material property’s image contents, each at a fraction of the original image’s size. When rendering, SceneKit automatically samples texels from the mipmap level closest to the size being rendered.

If the value of this property is SCNFilterModeNone, SceneKit does not use mipmapping. If the value of this property is SCNFilterModeLinear, SceneKit determines pixel colors using trilinear filtering. First it linearly interpolates a texel color from each of the two mipmap levels closest to the target size, then it linearly interpolates between the two results to determine the final color. This technique provides higher rendering quality at moderate performance cost.

In iOS 10, tvOS 10, watchOS 3, and macOS 10.12, the default mipmapping filter mode is SCNFilterModeNearest. In earlier OS versions, the default mode is SCNFilterModeNone.

The figure below shows the effects of enabling mipmapping. In the image on the left, mipmapping is disabled, causing pixelated artifacts as the checkerboard pattern recedes into the distance. Enabling linear mipmapping results in a smoother appearance.

Figure 1

Texture mipmapping

See Also

Configuring Texture Mapping Attributes

contentsTransform

The transformation applied to the material property’s visual contents. Animatable.

wrapS

The wrapping behavior for the S texture coordinate.

wrapT

The wrapping behavior for the T texture coordinate.

SCNWrapMode

Modes to apply to texture wrapping, used by the wrapT and wrapS properties.

minificationFilter

Texture filtering for rendering the material property’s image contents at a size smaller than that of the original image.

magnificationFilter

Texture filtering for rendering the material property’s image contents at a size larger than that of the original image.

SCNFilterMode

Texture filtering modes, used by the minificationFilter, magnificationFilter, and mipFilter properties.

maxAnisotropy

The amount of anisotropic texture filtering to be used when rendering the material property’s image contents.

mappingChannel

The source of texture coordinates for mapping the material property’s image contents.

borderColor

A color used to fill in areas of a material’s surface not covered by the material property’s image contents.

Deprecated