perf(gen): the floor is finally NATIVE -- clamp 29,634/29,634 -> 0, and the 551ms empty tile is dead

Two targets, both hit, and the second is the biggest in-game win since the interval work.

1. THE FLOOR IS NO LONGER PATCHED IN
The audit proved the backstop was doing the work: TunnelAuthoredFloorProtectionClamps
fired on EVERY authored floor sample while the named fallbacks fired zero. The cause,
in its own words, was that the stack composed the floor before the common
disturbance/passage writers, so every sample looked like a post-hoc clamp.

The floor is now composed ONCE, after those writers, at the final MC boundary. The
clamp inside the operator stack is deleted; the metadata stays on the sample for the
hand-off and for diagnostics but may no longer modify density.

  clamp fires        29,634 / 29,634  ->  0
  player-fit cells   20,804  (unchanged)
  walk reachable     10,884  (unchanged)
  connectivity       arrival -> departure, Connected
  geometry SHA-256   b3e5f4c3..9b377  IDENTICAL to 8e42d6d
  export, my 3 runs  1.320 / 1.424 / 1.439 s   (8e42d6d: 1.357 / 1.365 / 1.420)

⭐ Byte-identical output with the patch removed entirely. That is the proof the clamp
was never adding anything -- it was compensating for its own position in the pipeline.
Three days of "is the floor native yet" answered by moving where it is composed.

Remaining, and deliberately: the final support backstop still fires (6,509 export /
9,700 walk). Removing it is not capability-safe and it was not removed.

2. THE 551 ms EMPTY TILE IS GONE
An EMPTY LOD0 tile cost 551.7 ms: it returned verdict=Mixed, ran the full mesher, and
produced no triangles. Pure waste -- work done to discover there was nothing to do.

The cause is precise and worth recording: `AnyPassageModifierNearLattice` fed
`FPassageCarveOp::EffectOverBox` with a SPATIAL candidate test. Returning true killed
the AllSolid hypothesis even when every exact MC sample had a zero carve factor. A
"maybe something is near here" answer was being used where "does it actually change
anything at these samples" was required. It now takes the cheap domain test as a
reject, then consults the exact cached lattice carve factor the fold already computes.
Unknown or non-finite geometry stays conservative.

  empty Mixed fallbacks   86  ->  0      no empty tile enters the mesher at all
  empty tile p50      48.7 ms  ->  7.14 ms
  empty tile p95     451.3 ms  ->  11.54 ms
  empty tile max     551.7 ms  ->  27.86 ms

⚠️ Not fully at the "few ms" target: the remaining 27.86 ms tail is conservative
tunnel-tail proof work, not the old fallback. Honest, and a different problem.

Build 0 errors, three source files, no RMC or external paths touched. The shared
walkable-volume descriptor was not started.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012aheo2crrZmHuYtPpdY2Cb
This commit is contained in:
Fr0zkaandClaude Opus 5 committed 2026-09-11 05:55:43 +02:00
1 parent 5156084cac
commit 2260c4d47a
3 files changed
+483 -38

No files matched your search

@@ -2938,13 +2938,22 @@ namespace
bool UVoxelStrateManager::AnyPassageNearLattice(
const FBox& VoxelBox, const FIntVector& LatticeOrigin, int32 Step) const
{
// This is deliberately only the conservative spatial candidate test. The old implementation
// evaluated the complete modifier SDF here and then evaluated it a second time in
// MaxPassageCarveFactorNearLattice during the same fold. A bound hit is sufficient to keep
// the carve hypothesis alive; MaxPassageCarveFactorNearLattice supplies the exact lattice
// amplitude before the fold can preserve AllSolid.
return VF_AnyPassageModifierDomainTouchesLattice(
Passages, VoxelBox, LatticeOrigin, Step);
// This query feeds FPassageCarveOp::EffectOverBox, so a spatial candidate is not enough:
// returning true kills the AllSolid hypothesis even when the exact MC samples all have a
// zero carve factor. That was the LOD0 false-Mixed path. Keep the cheap domain test as the
// common reject, then use the same exact lattice factor that MaxCarveOverBox consumes. The
// manager cache makes the second call in the fold free for the same box.
if (!VF_AnyPassageModifierDomainTouchesLattice(
Passages, VoxelBox, LatticeOrigin, Step))
{
return false;
}
const float MaxFactor = MaxPassageCarveFactorNearLattice(
VoxelBox, LatticeOrigin, Step);
// Invalid input deliberately returns 1.0 from the exact helper. A non-finite result is also
// retained as a candidate rather than becoming an identity proof.
return !FMath::IsFinite(MaxFactor) || MaxFactor > 0.0f;
}
bool UVoxelStrateManager::AnyPassageAirPostNearLattice(