mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-06 17:41:04 +00:00
Return texture filter settings to previous state
This partially reverts commit 72ef90885d
.
fixes #14007
This commit is contained in:
parent
36f4953502
commit
7f9326805c
5 changed files with 76 additions and 16 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue