From 4e6ee97936449cba2a80403f3cbf096866bd0692 Mon Sep 17 00:00:00 2001 From: Rogier Date: Sun, 7 Jun 2015 20:30:56 +0200 Subject: [PATCH] Add a comment to clarify a magical formula --- TileGenerator.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/TileGenerator.cpp b/TileGenerator.cpp index 1101820..c347b4d 100644 --- a/TileGenerator.cpp +++ b/TileGenerator.cpp @@ -1303,6 +1303,8 @@ void TileGenerator::scalePixelRows(PixelAttributes &pixelAttributes, PixelAttrib void TileGenerator::pushPixelRows(PixelAttributes &pixelAttributes, int zPosLimit) { if (m_shading) + // Make shading less pronounced when map is scaled down + // (the formula for the emphasis parameter was determined (tuned) experimentally...) pixelAttributes.renderShading(m_scaleFactor < 3 ? 1 : 1 / sqrt(m_scaleFactor), m_drawAlpha); int y; for (y = pixelAttributes.getNextY(); y <= pixelAttributes.getLastY() && y < (worldBlockZ2StoredY(m_zMin - 1) + m_mapYEndNodeOffset) / m_scaleFactor; y++) {