acdream/tests/AcDream.App.Tests/Rendering/Wb
Erik c2cb83d11f perf(render): gate EnvCellRenderer visibility-snapshot rebuilds on real input changes (2026-07-24 audit review)
PrepareRenderBatches rebuilt the full EnvCell visibility snapshot every
frame any indoor/building root was resolved: a Parallel.ForEach dispatch
over every GpuReady EnvCell landblock (with per-landblock locks), a fresh
outer dictionary plus one fresh inner dictionary per visible cell, a new
snapshot object, and a complete transparency rescan - all while standing
perfectly still. The NeedsPrepare flag existed since Phase A8 as the
intended rebuild gate but was never read by production code.

This wires the gate on the snapshot's actual inputs:
- landblock commits/removals (the existing NeedsPrepare flag),
- the visible-cell filter (content-compared; the caller reuses one
  scratch HashSet across frames),
- the trim window (center/radius),
- mesh render-data availability - new
  ObjectMeshManager.RenderDataAvailabilityVersion, bumped at publish,
  pending-release hide, release completion, and teardown, because the
  snapshot bakes per-cell transparency from TryGetRenderData and a
  late-arriving transparent shell must reclassify its cell,
- the camera: eye position under a 1 mm ABSOLUTE epsilon (swallows the
  documented ~36 um rest jitter, dirties on any real movement; the VP
  translation row scales with AC's ~5e4 world coordinates where a
  relative tolerance would mask sub-meter motion) plus rows 1-3 of
  view*projection (position-independent rotation x projection) under
  relative 1e-5.

Skipping is pool-safe: RenderCore re-anchors _poolIndex to the active
snapshot's PostPreparePoolIndex on every call, so consecutive Renders
without an intervening Prepare reuse scratch lists past the snapshot's
owned region exactly as within-frame passes already do. The empty-filter
branch is now also idempotent instead of allocating a fresh empty
snapshot per frame. Render still receives the current frame's
view-projection every frame (the U.4 stale-matrix rule) - only the
snapshot rebuild is gated.

Pixels must be identical; needs the standard user visual pass (dungeon +
town-near-buildings) before the change is considered accepted.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-24 11:49:40 +02:00
..
BuildingLoaderTests.cs fix(render): Phase U.2b — resolve reciprocal portal by other_portal_id (retail 433557) 2026-05-30 16:56:00 +02:00
BuildingRegistryTests.cs feat(render): Phase A8 RR3 — Building + BuildingRegistry + BuildingLoader 2026-05-27 11:08:43 +02:00
BuildingTests.cs feat(render): Phase A8 RR3 — Building + BuildingRegistry + BuildingLoader 2026-05-27 11:08:43 +02:00
ContiguousRangeAllocatorTests.cs fix(rendering): bound portal resource lifetime 2026-07-18 21:35:16 +02:00
EntitySpawnAdapterLifetimeTests.cs refactor(world): extract live projection mechanics 2026-07-21 16:17:03 +02:00
EnvCellLandblockBuildTests.cs fix(streaming): commit EnvCell landblocks atomically (#214) 2026-07-13 18:45:24 +02:00
EnvCellRendererTests.cs perf(render): gate EnvCellRenderer visibility-snapshot rebuilds on real input changes (2026-07-24 audit review) 2026-07-24 11:49:40 +02:00
EnvCellSceneryInstanceTests.cs fix(streaming): commit EnvCell landblocks atomically (#214) 2026-07-13 18:45:24 +02:00
GpuRetiredRangeAllocatorTests.cs fix(rendering): bound portal resource lifetime 2026-07-18 21:35:16 +02:00
InstanceGroupClearTests.cs fix #225: stabilize render pacing and frame CPU 2026-07-19 06:29:30 +02:00
LandblockSpawnAdapterReadinessTests.cs fix(rendering): bound portal resource lifetime 2026-07-18 21:35:16 +02:00
MeshUploadCachesTests.cs fix(rendering): bound portal resource lifetime 2026-07-18 21:35:16 +02:00
ObjectMeshUploadBudgetTests.cs fix(rendering): bound portal resource lifetime 2026-07-18 21:35:16 +02:00
ObjectMeshWorkerLifecycleTests.cs fix #225: stabilize render pacing and frame CPU 2026-07-19 06:29:30 +02:00
RetryableResourceReleaseLedgerTests.cs fix(rendering): bound portal resource lifetime 2026-07-18 21:35:16 +02:00
TextureAtlasCapacityTests.cs fix(rendering): bound portal resource lifetime 2026-07-18 21:35:16 +02:00
TextureAtlasSlotAllocatorTests.cs fix(rendering): bound portal resource lifetime 2026-07-18 21:35:16 +02:00
WbDrawDispatcherClipSlotTests.cs feat(render): indoor render WORKS — terminating portal flood + every-cell seal + look-in FPS 2026-06-07 10:14:43 +02:00
WbDrawDispatcherCompositeWarmupTests.cs fix(rendering): bound portal resource lifetime 2026-07-18 21:35:16 +02:00
WbDrawDispatcherIndoorFlagTests.cs fix(lighting): #142 — per-instance sun gate for windowed-building interiors 2026-06-20 12:55:56 +02:00
WbDrawDispatcherTorchGateTests.cs fix(lighting): A7 Fix D round 2 — outdoor objects get NO torches (retail useSunlight gate) (#140) 2026-06-19 23:56:49 +02:00
WbFrustumTests.cs feat(render): Phase A8 Wave 1 — WB scaffolding extraction + stencil low-level method 2026-05-27 14:46:07 +02:00
WbTextureResolutionPolicyTests.cs fix(rendering): bound portal resource lifetime 2026-07-18 21:35:16 +02:00