I've noticed some inconsistency with model shadows and terrain illuminations. If you look at model shadows then you can tell that light is coming from the south-west, yet cliff faces are lit from north. Plus all territory from the wall to the bottom of the screen is visible to player, but it looks like shrouded in some places.
With a quick change I've inverted sun position for terrain, here are the results:
The main problem is with mini-map, it look a bit inverted now. Dunno if its some hack buried there or it need another hack
Here is the patch, any thoughts are welcome...
Code: Select all
diff --git a/src/lighting.cpp b/src/lighting.cpp
index 0b21350..d9f951d 100644
--- a/src/lighting.cpp
+++ b/src/lighting.cpp
@@ -217,7 +217,8 @@ static void calcTileIllum(UDWORD tileX, UDWORD tileY)
finalVector = finalVector + normals[i];
}
- dotProduct = normalise(finalVector) * theSun;
+ Vector3f sunVector(theSun.x, theSun.y, -theSun.z);
+ dotProduct = normalise(finalVector) * sunVector;
val = abs(dotProduct) / 16;
if (val == 0) val = 1;




