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.

fix(ww3d2): soft particles fade over twelve units again

Olcay Seygan001588189151
diff --git a/CHANGELOG.md b/CHANGELOG.md
index d2e667d8b..4f94af13c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1297,7 +1297,7 @@ The whole HUD is on the hardware. Four colours carry it, and they mean the same
- Up to a thousand craters stay on the ground in a long match, where the game kept five hundred and quietly dropped the oldest.
- An explosion lights everything around it, smoothly. On the default renderer the light of a blast reaches every tank, soldier, building and patch of ground it can see, fading out with distance, where the ground used to brighten in blocky squares and a model took only four lights at once, so in a big fight half the tanks next to a burning wreck stayed dark. The 32 blasts nearest the camera light at the same time, and a wall with its back to the fire stays in shadow. The light brightens what it falls on by three quarters at most: a nuke's took the ground to white within a few frames until it was held there.
- A bright cloud no longer shows what is behind it as a line drawing. Inside a nuke's white cloud, or a falling War Factory's fireball, every tree and wreck under it used to come out as a thin grey outline, and the picture's sharpening ringed each dark piece in white. Both stop where the frame is bright.
-- Smoke and fire no longer end on a straight line where they meet the ground or a building. A puff that sinks into a hillside or drifts against a wall thins out right where it touches, and only there, so a toxin cloud lying low over the ground keeps its body instead of breaking into hard-edged green islands. This is the default renderer; Classic and the old renderer keep the hard edge they had in 2003.
+- Smoke and fire no longer end on a straight line where they meet the ground or a building. A puff that sinks into a hillside or drifts against a wall thins out over its last few metres, softly enough that a nuke's haze and a Scud's grey smoke no longer come out as stacked, stair-stepped terraces, and a toxin cloud lying low over the ground keeps its body instead of breaking into hard-edged green islands. This is the default renderer; Classic and the old renderer keep the hard edge they had in 2003.
- A Scud Storm or a carpet bomb shakes the screen as hard as it should. The game cut a pile of heavy shakes back to a mild one, so a run of missiles or bombs landing together shook less than one of them alone. Each now shakes a step lighter and the run builds up. Demo traps and Aurora bombs shake now, and a falling building shakes harder the bigger it was.
- The shake knows how close you are. A shell landing in the middle of the screen kicks the camera half as hard again as it used to, one at the edge of the range barely moves it, and a heavy hit settles over about a second instead of stopping dead after half of one. The cut that put a pile of shakes back to a mild one is gone too: past the limit the camera holds at full shake.
- A building that falls throws up a cloud of dust that rolls out from its footprint and hangs for five or six seconds over a scorched patch of ground, thin enough that the collapse's own fire no longer lights it up into a white screen. A damaged building's fires burn bigger, and its smoke runs darker and longer, the closer it gets to falling.
diff --git a/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/dx11backend.cpp b/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/dx11backend.cpp
index 08d33f68d..2ba64a39a 100644
--- a/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/dx11backend.cpp
+++ b/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/dx11backend.cpp
@@ -621,11 +621,14 @@ static const unsigned SMOKE_MOST_CASTERS = 16384;
static const float SMOKE_SELF_SHADOW_GAIN = 0.8f;
static const float SMOKE_SELF_SHADOW_CURVE = 16.0f;
// How far in front of what is behind it a particle sprite has fully faded in, in world units. A
-// tank is about thirty long; a smoke puff is ten to forty across. A toxin cloud is a carpet of
-// puffs hovering a few units over the ground: at twelve, and still at five, the fade took most of
-// each one away and left their tops as hard-rimmed green islands. Two hides the line where a
-// sprite cuts a surface and leaves the carpet whole.
-static const float SOFT_PARTICLE_FADE_UNITS = 2.0f;
+// tank is about thirty long; a smoke puff is ten to forty across. At two, a sprite still met the
+// ground over a pixel or two at the default zoom: a nuke's haze and the Scud's grey smoke came out as
+// stacked stair-stepped terraces and every toxin puff as a hard-rimmed island, the posterized
+// blastcheck frames of 2026-10-06, and at zero it is the unfaded game's cut lines outright. Twelve
+// on the smoothstep (SOFT_PARTICLE_SAMPLING) is smooth in both and keeps the toxin carpet whole; the
+// islands once blamed on twelve were the straight ramp's creases, which the smoothstep took away.
+// Twenty starts to thin the carpet.
+static const float SOFT_PARTICLE_FADE_UNITS = 12.0f;
// Each caster is a disc facing the sun, drawn as a four corner strip whose corners come from the
// vertex number, so the only buffer is the one holding the casters.