1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-06 17:41:04 +00:00

Rename SMaterial::TextureLayer -> SMaterial::TextureLayers

It's not the "texture layer" of the material, but an array of texture layers.
This commit is contained in:
Gregor Parzefall 2023-06-24 15:18:10 +02:00 committed by sfan5
parent 05ebe2418b
commit 6bf63d4b41
9 changed files with 38 additions and 38 deletions

View file

@ -230,10 +230,10 @@ struct TileLayer
}
material.BackfaceCulling = (material_flags & MATERIAL_FLAG_BACKFACE_CULLING) != 0;
if (!(material_flags & MATERIAL_FLAG_TILEABLE_HORIZONTAL)) {
material.TextureLayer[0].TextureWrapU = video::ETC_CLAMP_TO_EDGE;
material.TextureLayers[0].TextureWrapU = video::ETC_CLAMP_TO_EDGE;
}
if (!(material_flags & MATERIAL_FLAG_TILEABLE_VERTICAL)) {
material.TextureLayer[0].TextureWrapV = video::ETC_CLAMP_TO_EDGE;
material.TextureLayers[0].TextureWrapV = video::ETC_CLAMP_TO_EDGE;
}
}
@ -241,12 +241,12 @@ struct TileLayer
{
material.BackfaceCulling = (material_flags & MATERIAL_FLAG_BACKFACE_CULLING) != 0;
if (!(material_flags & MATERIAL_FLAG_TILEABLE_HORIZONTAL)) {
material.TextureLayer[0].TextureWrapU = video::ETC_CLAMP_TO_EDGE;
material.TextureLayer[1].TextureWrapU = video::ETC_CLAMP_TO_EDGE;
material.TextureLayers[0].TextureWrapU = video::ETC_CLAMP_TO_EDGE;
material.TextureLayers[1].TextureWrapU = video::ETC_CLAMP_TO_EDGE;
}
if (!(material_flags & MATERIAL_FLAG_TILEABLE_VERTICAL)) {
material.TextureLayer[0].TextureWrapV = video::ETC_CLAMP_TO_EDGE;
material.TextureLayer[1].TextureWrapV = video::ETC_CLAMP_TO_EDGE;
material.TextureLayers[0].TextureWrapV = video::ETC_CLAMP_TO_EDGE;
material.TextureLayers[1].TextureWrapV = video::ETC_CLAMP_TO_EDGE;
}
}