mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-06 17:41:04 +00:00
Optimize lighting calculation (#12797)
This commit is contained in:
parent
440d966b93
commit
9676364c1f
18 changed files with 188 additions and 220 deletions
|
@ -472,7 +472,7 @@ void MapblockMeshGenerator::prepareLiquidNodeDrawing()
|
|||
// it at what it emits, for an increased effect
|
||||
u8 e = decode_light(f->light_source);
|
||||
light = LightPair(std::max(e, light.lightDay), std::max(e, light.lightNight));
|
||||
} else if (nodedef->get(ntop).param_type == CPT_LIGHT) {
|
||||
} else if (nodedef->getLightingFlags(ntop).has_light) {
|
||||
// Otherwise, use the light of the node on top if possible
|
||||
light = LightPair(getInteriorLight(ntop, 0, nodedef));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue