1
0
mirror of https://github.com/minetest/minetest.git synced 2025-06-30 23:20:22 +02:00

Return texture filter settings to previous state

This partially reverts commit 72ef90885d.

fixes #14007
This commit is contained in:
sfan5
2023-11-19 20:28:37 +01:00
committed by SmallJoker
parent 36f4953502
commit 7f9326805c
5 changed files with 76 additions and 16 deletions

View File

@ -1381,6 +1381,13 @@ void GenericCAO::updateTextures(std::string mod)
material.Lighting = true;
material.BackfaceCulling = m_prop.backface_culling;
// don't filter low-res textures, makes them look blurry
// player models have a res of 64
const core::dimension2d<u32> &size = texture->getOriginalSize();
const u32 res = std::min(size.Height, size.Width);
use_trilinear_filter &= res > 64;
use_bilinear_filter &= res > 64;
material.forEachTexture([=] (auto &tex) {
setMaterialFilters(tex, use_bilinear_filter, use_trilinear_filter,
use_anisotropic_filter);