From bf91d623c8fc1fede7b600d1b0f4be1bc6b37c44 Mon Sep 17 00:00:00 2001 From: RealBadAngel Date: Sat, 16 Aug 2014 14:02:50 +0200 Subject: Let lighting be done only CPU side. Remove finalColorBlend implementation from shaders. --- src/mapblock_mesh.cpp | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'src/mapblock_mesh.cpp') diff --git a/src/mapblock_mesh.cpp b/src/mapblock_mesh.cpp index ef2c868a0..ad0fcb436 100644 --- a/src/mapblock_mesh.cpp +++ b/src/mapblock_mesh.cpp @@ -1158,16 +1158,13 @@ MapBlockMesh::MapBlockMesh(MeshMakeData *data, v3s16 camera_offset): applyFacesShading (vc, 0.836660); } } - if(!enable_shaders) - { - // - Classic lighting (shaders handle this by themselves) - // Set initial real color and store for later updates - u8 day = vc.getRed(); - u8 night = vc.getGreen(); - finalColorBlend(vc, day, night, 1000); - if(day != night) - m_daynight_diffs[i][j] = std::make_pair(day, night); - } + // - Classic lighting + // Set initial real color and store for later updates + u8 day = vc.getRed(); + u8 night = vc.getGreen(); + finalColorBlend(vc, day, night, 1000); + if(day != night) + m_daynight_diffs[i][j] = std::make_pair(day, night); } // Create material -- cgit v1.2.3