mirror of
				https://github.com/luanti-org/luanti.git
				synced 2025-10-31 07:25:22 +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:
		| @@ -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( | ||||
|   | ||||
		Reference in New Issue
	
	Block a user