Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
diff --git a/src/mapblock_mesh.cpp b/src/mapblock_mesh.cpp
index 581fb8f..0800259 100644
--- a/src/mapblock_mesh.cpp
+++ b/src/mapblock_mesh.cpp
@@ -32,7 +32,7 @@
#include "settings.h"
#include "util/directiontables.h"
-void applyContrast(video::SColor& color, float factor)
+static void applyContrast(video::SColor& color, float factor)
{
color.setRed(core::clamp(core::round32(color.getRed()*factor), 0, 255));
color.setGreen(core::clamp(core::round32(color.getGreen()*factor), 0, 255));
@@ -1144,21 +1144,21 @@ static void updateAllFastFaceRows(MeshMakeData *data,
{
video::SColor &vc = p.vertices[j].Color;
if(p.vertices[j].Normal.Y > 0.5) {
- applyContrast (vc, 1.2);
+ applyContrast (vc, 1.1);
} else if (p.vertices[j].Normal.Y < -0.5) {
- applyContrast (vc, 0.4);
+ applyContrast (vc, 0.55);
} else if (p.vertices[j].Normal.X > 0.5) {
- applyContrast (vc, 0.6);
+ applyContrast (vc, 0.71);
} else if (p.vertices[j].Normal.X < -0.5) {
- applyContrast (vc, 0.6);
+ applyContrast (vc, 0.71);
} else if (p.vertices[j].Normal.Z > 0.5) {
- applyContrast (vc, 0.8);
+ applyContrast (vc, 0.89);
} else if (p.vertices[j].Normal.Z < -0.5) {
- applyContrast (vc, 0.8);
+ applyContrast (vc, 0.89);
}
if(!enable_shaders)
{
- // - Classic lighting (shaders handle this by themselves)
+ // - Classic lighting (shaders handle this by themselves)
// Set initial real color and store for later updates
u8 day = vc.getRed();
u8 night = vc.getGreen();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment