mirror of
https://github.com/minetest/minetest.git
synced 2024-11-11 12:50:38 +01:00
Meshgen: Don't get lights for not drawn solid faces
`drawCuboid()` doesn't call the face lighter function for masked faces, so we don't need these values. This is for performance.
This commit is contained in:
parent
df8afe3dc4
commit
da1fc9a536
|
@ -463,6 +463,8 @@ void MapblockMeshGenerator::drawSolidNode()
|
|||
if (data->m_smooth_lighting) {
|
||||
LightPair lights[6][4];
|
||||
for (int face = 0; face < 6; ++face) {
|
||||
if (mask & (1 << face))
|
||||
continue;
|
||||
for (int k = 0; k < 4; k++) {
|
||||
v3s16 corner = light_dirs[light_indices[face][k]];
|
||||
lights[face][k] = LightPair(getSmoothLightSolid(
|
||||
|
|
Loading…
Reference in New Issue
Block a user