1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-06 17:41:04 +00: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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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.