关于Mipmap

1。为什么用MIPMAP
-保留细节:当纹理缩小大于2倍时,使用双线性过滤器会丢失很多细节,纹理高频部分会放大。因为超过4个像素映射到一个像素。可以通过采样更多的像素来解决,但是耗性能。
-性能:使用小的纹理texcache命中率会更高,对于小的几何体完全可以用更小的贴图。
-闪烁:大的纹理贴到小的几何体导致闪烁
使用MIPMAP可以解决以上问题,代价是多占用约1/3的内存。

2。各向异性过滤
When a texture is viewed at a steep angle, the filtering should not be uniform in each direction (it should be anisotropic rather than isotropic), and a compromise resolution is required. If a higher resolution is used, the cache coherence goes down, and the aliasing is increased in one direction, but the image tends to be clearer. If a lower resolution is used, the cache coherence is improved, but the image is overly blurry. This would be a tradeoff of MIP level of detail (LOD) for aliasing vs blurriness.

猜你喜欢

转载自blog.csdn.net/janker5/article/details/83418292