minetest / minetest

Luanti (formerly Minetest) is an open source voxel game-creation platform with easy modding and game creation
https://www.minetest.net/
Other
10.81k stars 2.03k forks source link

(Question) Is Mipmap and Aniso filter improve performance? #12899

Closed oong819 closed 2 years ago

oong819 commented 2 years ago

Is Mipmap and Aniso filter improve performance?

sorry if issue are not a place for question

Desour commented 2 years ago

AFAIK, mipmapping can increase performance if you have large textures, because of better texel caching. See also here: https://stackoverflow.com/questions/19123706/opengl-directx-how-does-mipmapping-improve-performance In minetest you most likely won't get any performance benefit. Textures are usually very small (16x16 (or upscaled to 64x64 because of that weird setting that's probably just there because irrlicht doesn't allow only-downscale bilinear filter (still tiny))), and texture fetching is not the bottleneck. Mipmapping is for reducing aliasing effects (e.g. floor waves) by downscaling. Anisotropic filtering fixes the resulting issues that you get if the uv pos difference in screen space x-dir is much larger or smaller than the y-dir difference (when you look steeply on a surface, it gets blurry, see e.g. rail nodes). This is usually done by doing more texture fetches along the respective direction when texture sampling. It looks much better, and potentially decreases performance.

That should be more than enough information, for details do web searches. Issue can be closed I guess.