1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Refactor the way you set material properties

Instead of using SMaterial::setFlag, you now set them directly on SMaterial or SMaterialLayer.
This commit is contained in:
Gregor Parzefall 2023-06-23 11:33:23 +02:00 committed by sfan5
parent 128d22e6ee
commit 307e380f30
15 changed files with 202 additions and 171 deletions

View file

@ -50,9 +50,11 @@ static video::SMaterial baseMaterial()
static inline void disableTextureFiltering(video::SMaterial &mat)
{
mat.setFlag(video::E_MATERIAL_FLAG::EMF_BILINEAR_FILTER, false);
mat.setFlag(video::E_MATERIAL_FLAG::EMF_TRILINEAR_FILTER, false);
mat.setFlag(video::E_MATERIAL_FLAG::EMF_ANISOTROPIC_FILTER, false);
mat.forEachTexture([] (video::SMaterialLayer &tex) {
tex.BilinearFilter = false;
tex.TrilinearFilter = false;
tex.AnisotropicFilter = 0;
});
}
Sky::Sky(s32 id, RenderingEngine *rendering_engine, ITextureSource *tsrc, IShaderSource *ssrc) :