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
var mipFilter: SCNFilterMode { get set }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 SCNFilterMode.none, SceneKit does not use mipmapping. If the value of this property is SCNFilterMode.linear, 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 SCNFilterMode.nearest. In earlier OS versions, the default mode is SCNFilterMode.none.
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.
[Image]