Fensalir/state/scratch.md
2026-05-29 23:28:43 +01:00

2.6 KiB

Scratch

Current Slice

Extend native-domain reservoir replay from single-batch TubeField/SDF proof paths into measured baseline/native-domain capture. The first comparison set is artifacts/fensalir-captures/reservoir-compare-20260529-231904-*: native versus texel-baseline changed 10.8208% of final-frame pixels, 0.0165% of rejection-debug pixels, and 0.2976% of shift-debug pixels.

Hot Lesson

Area ReSTIR confirms that reuse over an area domain is invalid unless the reservoir stores the selected sample's actual domain coordinates and support. TSR confirms that temporal reconstruction must reject, reconstruct, and expose history trust at the layer that owns visible output. Fensalir needs both, but one level higher: selected samples are field and radiance claims lowered from semantic domains and a dynamic contribution tree into bounded GPU reservoirs.

The current nine-lane row ABI now carries first-class selected domain/sample-coordinate authority. A row keyed only by pixel, travel, field id, guide, proposal, and stats is no longer accepted as valid reservoir evidence. TubeField row samples store selected UV, logical column, curve coordinate, support footprint, domain kind, and shift kind; field id carries physical rolling-column identity. The old single-batch replay binding has been replaced by a bounded producer-keyed manifest plus raw source descriptor table, so the shader picks the replay source per selected TubeField sample instead of accepting/rejecting the whole frame by batch count. SDF history reconstructs the previous selected world hit from stored UV/travel, carries it through object center motion, and validates current ray/travel/support before temporal reuse can merge it. TubeField batches beyond the manifest source cap remain intentionally non-authoritative.

Next Bounded Move

Follow docs/perfect-fensalir-machine-roadmap.md Phase 1:

  1. Add a real metric harness for temporal leakage/ghosting instead of relying on single-frame image deltas.
  2. Add exact SDF producer replay only when client SDF distance functions have a shared replay include or manifest instead of duplicating shader policy in post.
  3. Replace the bounded TubeField replay source descriptor table with a replay atlas only if real scenes hit the cap.

Verification

  • dotnet build Fensalir.sln
  • dotnet test tests/Aquarium.Engine.Tests/Aquarium.Engine.Tests.csproj
  • dotnet test tests/Aquarium.Engine.Fractal.Tests/Aquarium.Engine.Fractal.Tests.csproj
  • .\scripts\dev-reload.ps1 -Headless -RetainSlots 4 -ClientProject src\Aquarium.Fensalir\Aquarium.Fensalir.csproj