perf(vfx): port retail particle visibility degradation

Resolve DAT-authored particle ranges from the hardware GfxObj, apply retail distance and completed-cell visibility gates, and preserve the exact finite/infinite off-view update semantics. This removes dense-world simulation work without shortening terrain, entity, fog, or streaming distance.

Publish doorway-clipped outdoor cells through a focused frame controller, retain effect cell identity for outdoor statics, reject hidden emitters before particle-slot scans, and offer an explicit opt-in Extended particle range.

Release build succeeds and all 5,857 tests pass with five intentional skips. Retail-conformance, architecture, and adversarial review cycles are clean; connected Aerlinthe visual/performance gate pending.

Co-authored-by: OpenAI Codex <codex@openai.com>
This commit is contained in:
Erik 2026-07-17 15:27:36 +02:00
parent 82789eea88
commit f1ba147ac5
29 changed files with 1810 additions and 125 deletions

View file

@ -147,6 +147,29 @@ public class LandblockLoaderTests
Assert.All(idsB, id => Assert.Equal(0xC0u, (id >> 24) & 0xFFu));
}
[Fact]
public void BuildEntitiesFromInfo_AssignsOutdoorEffectCellWithoutChangingRenderParent()
{
var info = new LandBlockInfo
{
Objects =
{
new Stab
{
Id = 0x01000001u,
Frame = new Frame { Origin = new Vector3(25f, 49f, 0f) },
},
},
};
WorldEntity entity = Assert.Single(
LandblockLoader.BuildEntitiesFromInfo(info, 0xA9B40000u));
// x cell 1, y cell 2 => 1 + 1*8 + 2 = 11 (0x0B).
Assert.Equal(0xA9B4000Bu, entity.EffectCellId);
Assert.Null(entity.ParentCellId);
}
[Fact]
public void BuildEntitiesFromInfo_LegacyZeroLandblockId_StartsAtOne()
{