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

@ -167,6 +167,26 @@ public sealed class RetailParticleGeometryClassifierTests
Assert.Equal(0x33000331u, resolver.Resolve(0x34000004u, 0x76u, 1f));
}
[Fact]
public void InstalledAerlintheSwarmEmitter_UsesItsHardwareGfxDegradeDistance()
{
string? datDir = ResolveDatDir();
if (datDir is null)
throw SkipException.ForSkip("Installed client_portal.dat is required.");
using var dats = new DatCollection(datDir, DatAccessType.Read);
var emitters = new EmitterDescRegistry(dats);
EmitterDesc desc = emitters.Get(0x32000223u);
GfxObj gfx = Assert.IsType<GfxObj>(dats.Get<GfxObj>(desc.HwGfxObjId));
GfxObjDegradeInfo degrade = Assert.IsType<GfxObjDegradeInfo>(
dats.Get<GfxObjDegradeInfo>(gfx.DIDDegrade));
Assert.Equal(
RetailParticleDegradeDistance.FromEntries(degrade.Degrades),
desc.MaxDegradeDistance);
Assert.Equal(64f, desc.MaxDegradeDistance);
}
private static string? ResolveDatDir()
{
string? configured = System.Environment.GetEnvironmentVariable("ACDREAM_DAT_DIR");