aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRealBadAngel <maciej.kasatkin@o2.pl>2014-08-16 14:02:50 +0200
committerRealBadAngel <maciej.kasatkin@o2.pl>2014-08-16 14:48:52 +0200
commitbf91d623c8fc1fede7b600d1b0f4be1bc6b37c44 (patch)
tree1af91342a7a58b0ed115e7d0f3687beadafdb5ee /src
parent0a57b5b553e80e158e28594866f3c83514baf388 (diff)
downloadminetest-bf91d623c8fc1fede7b600d1b0f4be1bc6b37c44.tar.gz
minetest-bf91d623c8fc1fede7b600d1b0f4be1bc6b37c44.tar.bz2
minetest-bf91d623c8fc1fede7b600d1b0f4be1bc6b37c44.zip
Let lighting be done only CPU side. Remove finalColorBlend implementation from shaders.
Diffstat (limited to 'src')
-rw-r--r--src/mapblock_mesh.cpp17
1 files changed, 7 insertions, 10 deletions
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