mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-12 16:58:39 +00:00
Clean up texture filtering settings (#13683)
This commit is contained in:
parent
d0ee63c766
commit
72ef90885d
8 changed files with 52 additions and 94 deletions
|
@ -503,3 +503,18 @@ scene::IMesh* convertNodeboxesToMesh(const std::vector<aabb3f> &boxes,
|
|||
}
|
||||
return dst_mesh;
|
||||
}
|
||||
|
||||
void setMaterialFilters(video::SMaterialLayer &tex, bool bilinear, bool trilinear, bool anisotropic) {
|
||||
if (trilinear)
|
||||
tex.MinFilter = video::ETMINF_LINEAR_MIPMAP_LINEAR;
|
||||
else if (bilinear)
|
||||
tex.MinFilter = video::ETMINF_LINEAR_MIPMAP_NEAREST;
|
||||
else
|
||||
tex.MinFilter = video::ETMINF_NEAREST_MIPMAP_NEAREST;
|
||||
|
||||
// "We don't want blurriness after all." ~ Desour, #13108
|
||||
// (because of pixel art)
|
||||
tex.MagFilter = video::ETMAGF_NEAREST;
|
||||
|
||||
tex.AnisotropicFilter = anisotropic ? 0xFF : 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue