Skip to content

Zero Hour rebuilt from EA's source: x64, Direct3D 11, VS2022/CMake, ~60 original bugs fixed, an AI that builds a base. Bring your own game.

feat(w3ddevice): settle the shadow darkness at 0.45 over a full base

Olcay Seygan4653233f7618
diff --git a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/Shadow/W3DVolumetricShadow.cpp b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/Shadow/W3DVolumetricShadow.cpp
index 3d849ccab..d2ac3638e 100644
--- a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/Shadow/W3DVolumetricShadow.cpp
+++ b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/Shadow/W3DVolumetricShadow.cpp
@@ -110,7 +110,10 @@ const Real cosAngleToCare = cos ((0.2 * PI) / 180.0); //1.5 degree difference
// fully blocked pixel goes, and how far the filter reaches in texels. The first is the one that
// decides between a surface shadowing itself in stripes and a shadow lifting off its own caster.
#define SHADOW_MAP_DEPTH_BIAS 0.0015f
-#define SHADOW_MAP_STRENGTH 0.55f
+// 0.55 was picked on a frame with one base in it; over fourteen buildings a wide shadow on the
+// ground read at a quarter of the sunlit sand, black in front of every wall, and the owner took
+// 0.45 from three panels of the same base on 2026-09-21.
+#define SHADOW_MAP_STRENGTH 0.45f
// How wide the filter may open and how narrow it stays on the ground, in texels of the map, and how
// much penumbra a unit of gap between a caster and what its shadow falls on is worth. The last is
// the number the whole picture turns on: a tank's tracks are on the ground and keep a hard edge, a