NICE filtering
NICE is the default mipmap filter used by Vtex. Images downsampled with NICE tend to look sharp and have better-preserved edges, which is often preferred for mipmaps. The filter is equivalent to Lanczos-3 and acts similarly to the Sine Cardinal filter available in VTFLib.
The filter has a radius of 3, resulting in a 7x7 kernel. An implementation of NICE can be found inside imageloader.cpp
in the Source SDK.
While there is no "best" kernel (which is one of the reasons VTFLib offers so many kernels) NICE filtering tends to produce cleaner results than simple box filtering as it better preserves high-frequency information. Textures mipmapped with it tend to look less blurry than those mipmapped with box filtering.
Aliasing
Because NICE is a sharpening kernel, it tends to accentuate the edges of resampled images. While this works to our advantage on most textures, it may cause issues with non-color images such as bumpmaps and various masks. Because of this, Vtex will automatically disable NICE filtering on textures created with the '_normal' suffix.
Further reading
- Source SDK 2004 implementation imageloader.cpp
- ImageWorsener: Image Resampling[1]
- Blinn, James F.: Jim Blinn's Corner: Dirty Pixels, Morgan Kaufmann Publishers, Inc., ISBN 1-55860-455-3