Difference between revisions of "NICE filtering"

From Valve Developer Community
Jump to: navigation, search
(Aliasing)
(Aliasing)
 
Line 9: Line 9:
 
== Aliasing ==
 
== Aliasing ==
  
Due to the matrix NICE filtering uses it is recommended to disable it on textures with high contrast alpha masks that require accurate precision (e.g. $blendTintByBaseAlpha) and Normal maps which require smoothness. Usage may create undesired aliasing on the mipmaps. [[Vtex]] will automatically disable NICE filtering on textures compile with the '_normal' suffix.
+
Due to the matrix NICE filtering uses it is recommended to disable it on textures with high contrast alpha masks that require accurate precision (e.g. $blendTintByBaseAlpha) and Normal maps which require smoothness. Usage may create undesired aliasing on the mipmaps. [[Vtex]] will automatically disable NICE filtering on textures created with the '_normal' suffix.
  
 
== Further reading ==
 
== Further reading ==
  
 
* Blinn, James F.: Jim Blinn's Corner: Dirty Pixels, Morgan Kaufmann Publishers, Inc., [http://en.wikipedia.org/w/index.php?title=Special:Booksources&isbn=1558604553 <nowiki>ISBN 1-55860-455-3</nowiki>]
 
* Blinn, James F.: Jim Blinn's Corner: Dirty Pixels, Morgan Kaufmann Publishers, Inc., [http://en.wikipedia.org/w/index.php?title=Special:Booksources&isbn=1558604553 <nowiki>ISBN 1-55860-455-3</nowiki>]

Latest revision as of 00:04, 12 October 2012

NICE is the default mipmap resize kernel used by Vtex. It is a 7x7 matrix similar to the Sine Cardinal kernel available in VTFLib. It is a good general purpose kernel that gives sharp results.

While there is no "best" kernel (which is one of the reasons VTFLib offers so many kernels) NICE filtering is better than simple box-filtering because it preserves high-frequency information: Textures mipmapped with it look less blurry than those mipmapped with box filtering.

An implementation of the NICE filter can be found inside the imageloader.cpp file in the Source SDK.

Aliasing

Due to the matrix NICE filtering uses it is recommended to disable it on textures with high contrast alpha masks that require accurate precision (e.g. $blendTintByBaseAlpha) and Normal maps which require smoothness. Usage may create undesired aliasing on the mipmaps. Vtex will automatically disable NICE filtering on textures created with the '_normal' suffix.

Further reading

  • Blinn, James F.: Jim Blinn's Corner: Dirty Pixels, Morgan Kaufmann Publishers, Inc., ISBN 1-55860-455-3