mirror of
https://github.com/minetest/minetest.git
synced 2024-11-27 10:03:45 +01:00
Cull liquid back face on liquid-glasslike interface (#13594)
This commit is contained in:
parent
edcbfa31c9
commit
f1feeb319c
@ -457,11 +457,9 @@ void MapblockMeshGenerator::drawSolidNode()
|
|||||||
if (f2.solidness == 2)
|
if (f2.solidness == 2)
|
||||||
continue;
|
continue;
|
||||||
if (f->drawtype == NDT_LIQUID) {
|
if (f->drawtype == NDT_LIQUID) {
|
||||||
if (n2 == nodedef->getId(f->liquid_alternative_flowing))
|
if (f->sameLiquidRender(f2))
|
||||||
continue;
|
continue;
|
||||||
if (n2 == nodedef->getId(f->liquid_alternative_source))
|
backface_culling = f2.solidness || f2.visual_solidness;
|
||||||
continue;
|
|
||||||
backface_culling = f2.solidness >= 1;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
faces |= 1 << face;
|
faces |= 1 << face;
|
||||||
@ -469,8 +467,6 @@ void MapblockMeshGenerator::drawSolidNode()
|
|||||||
for (auto &layer : tiles[face].layers) {
|
for (auto &layer : tiles[face].layers) {
|
||||||
if (backface_culling)
|
if (backface_culling)
|
||||||
layer.material_flags |= MATERIAL_FLAG_BACKFACE_CULLING;
|
layer.material_flags |= MATERIAL_FLAG_BACKFACE_CULLING;
|
||||||
else
|
|
||||||
layer.material_flags &= ~MATERIAL_FLAG_BACKFACE_CULLING;
|
|
||||||
layer.material_flags |= MATERIAL_FLAG_TILEABLE_HORIZONTAL;
|
layer.material_flags |= MATERIAL_FLAG_TILEABLE_HORIZONTAL;
|
||||||
layer.material_flags |= MATERIAL_FLAG_TILEABLE_VERTICAL;
|
layer.material_flags |= MATERIAL_FLAG_TILEABLE_VERTICAL;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user