summaryrefslogtreecommitdiff
path: root/src/mapblock_mesh.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mapblock_mesh.cpp')
-rw-r--r--src/mapblock_mesh.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mapblock_mesh.cpp b/src/mapblock_mesh.cpp
index 0744cd527..79d02d6ff 100644
--- a/src/mapblock_mesh.cpp
+++ b/src/mapblock_mesh.cpp
@@ -1090,10 +1090,10 @@ MapBlockMesh::MapBlockMesh(MeshMakeData *data, v3s16 camera_offset):
brightness of vertices 1 and 3 differ less than
the brightness of vertices 0 and 2.
*/
- if (abs(f.vertices[0].Color.getAverage()
- - f.vertices[2].Color.getAverage())
- > abs(f.vertices[1].Color.getAverage()
- - f.vertices[3].Color.getAverage()))
+ if (abs(f.vertices[0].Color.getLuminance()
+ - f.vertices[2].Color.getLuminance())
+ > abs(f.vertices[1].Color.getLuminance()
+ - f.vertices[3].Color.getLuminance()))
indices_p = indices_alternate;
collector.append(f.tile, f.vertices, 4, indices_p, 6);