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

Avoid rendering invisible faces of simple nodeboxes (#12262)

* Skip rendering faces adjacent to opaque nodes
* Cancel out opposite faces of adjacent nodebox nodes of the same type

Fixes #6409
This commit is contained in:
x2048
2022-05-04 23:44:55 +02:00
committed by GitHub
parent 89c82035d8
commit cc56ebd90d
2 changed files with 82 additions and 13 deletions

View File

@@ -100,10 +100,11 @@ public:
// cuboid drawing!
void drawCuboid(const aabb3f &box, TileSpec *tiles, int tilecount,
const LightInfo *lights , const f32 *txc);
const LightInfo *lights , const f32 *txc, u8 mask = 0);
void generateCuboidTextureCoords(aabb3f const &box, f32 *coords);
void drawAutoLightedCuboid(aabb3f box, const f32 *txc = NULL,
TileSpec *tiles = NULL, int tile_count = 0);
TileSpec *tiles = NULL, int tile_count = 0, u8 mask = 0);
u8 getNodeBoxMask(aabb3f box, u8 solid_neighbors, u8 sametype_neighbors) const;
// liquid-specific
bool top_is_same_liquid;