1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-14 17:15:21 +02:00

Remove fast faces (#13216)

Co-authored-by: Lars <larsh@apache.org>
This commit is contained in:
Vitaliy
2023-04-08 21:17:15 +03:00
committed by GitHub
parent c2a9ac24ac
commit 35929d27e3
5 changed files with 208 additions and 695 deletions

View File

@@ -254,12 +254,6 @@ struct TileLayer
}
}
bool isTileable() const
{
return (material_flags & MATERIAL_FLAG_TILEABLE_HORIZONTAL)
&& (material_flags & MATERIAL_FLAG_TILEABLE_VERTICAL);
}
bool isTransparent() const
{
switch (material_type) {
@@ -312,22 +306,6 @@ struct TileSpec
{
TileSpec() = default;
/*!
* Returns true if this tile can be merged with the other tile.
*/
bool isTileable(const TileSpec &other) const {
for (int layer = 0; layer < MAX_TILE_LAYERS; layer++) {
if (layers[layer] != other.layers[layer])
return false;
// Only non-transparent tiles can be merged into fast faces
if (layers[layer].isTransparent() || !layers[layer].isTileable())
return false;
}
return rotation == 0
&& rotation == other.rotation
&& emissive_light == other.emissive_light;
}
//! If true, the tile rotation is ignored.
bool world_aligned = false;
//! Tile rotation.