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.
C++ cmakecnccommand-and-conquercppdirectx11game-enginegame-preservationgeneralsrtssage-enginex64zero-hour
feat(w3ddevice): settle the shadow map on the darkness the owner picked
Olcay Seygan9ba4b1973fe7
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex d15591998..002ad271d 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -764,6 +764,13 @@ found and fixed — EA's own, not port damage.**## Soldiers cast real shadows+- A shadow now softens as the thing casting it leaves the ground. Tracks, feet and crates keep the+ hard edge they always had, because the shadow starts where the object does; a helicopter's slides+ out from under it and spreads as it climbs, and pales with the same height, the way the sky fills+ a shadow back in. The game drew every shadow as one hard silhouette before this, whether it came+ off a tank's hull or off something twenty metres up, and edges that sharp are the tell that a+ picture was computed rather than photographed. `-shadowmap` turns it on; without it the old+ shadows are what you get, and a machine that cannot run the newer picture keeps them.- Infantry shadows are built from the pose: arms, head, weapon, moving with him.- `UseShadowVolumesForSkins = No` puts the old flat blobs back.- Scuds, rockets and falling bombs cast a shadow running along the ground.diff --git a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/Shadow/W3DVolumetricShadow.cpp b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/Shadow/W3DVolumetricShadow.cppindex 8f1c65c41..3deeb3042 100644--- a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/Shadow/W3DVolumetricShadow.cpp+++ b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/Shadow/W3DVolumetricShadow.cpp@@ -109,7 +109,7 @@ 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.45f+#define SHADOW_MAP_STRENGTH 0.65f// 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