2026-10-17: retired at user request. Frame generation, its settings and geometry,
shadow and sprite histories have been removed. Image motion estimation remains
only for temporal upscaling; UI layer capture remains for ambient occlusion.
The following records describe the retired implementation.

Optional presentation interpolation

2026-10-16 follow-up: wheels, lights, MSAA and car selection

Car selection draws the reflection and then the real car using the same mesh
identity but different transforms. The first draw previously consumed the
history entry, leaving the real car with stationary camera motion. Repeated
draws now retain separate histories in their original order. The captured
showroom trace is build/captures/frame-28427993300 (reflection draws 1-5,
car draws 31-35).

Fast wheel rotation exposed a different problem: straight lines between two
spoke positions can collapse the tyre's outline. The verified wheel draw at
C33E0, called from 862B8, now transports the wheel by its hub movement while
retaining the original spinning-wheel appearance. Original endpoint drawing
is unchanged. This uses the original wheel shader and its position constants,
not an estimated angular velocity.

Depth-tested screen-space sprites, including brake glow and smoke, were being
stored with the stationary HUD. Their original vertices, colours, textures and
blend operations now have a separate bounded history. Each sprite follows its
world position or the car beneath its anchor; disappearing lights select the
appropriate endpoint. HUD blending remains separate. Replay preserves the
surface-coverage alpha channel. Existing cached blend states are prepared when
interpolation is enabled during a session. The three sprite histories use
about 7 MiB of GPU storage and 2 MiB of CPU staging, independent of resolution.

MSAA colour can contain a car sample even when the pixel centre misses the car.
Motion projection now replays the actual MSAA sample positions into the existing
single-sample motion field. Visibility uses the covered sample; attribute
evaluation returns motion to the pixel centre. This avoids the bright fragments
left following road motion. No additional full-resolution history is needed.
Expanded-triangle/conservative-raster approaches were rejected for cost: their
two motion passes took about 1.45 ms, compared with 0.12 ms for sample replay at
2x resolution and 4x MSAA on the RTX 5060 Ti. Sample-location and attribute
evaluation semantics are documented at:
https://learn.microsoft.com/en-us/windows/win32/direct3dhlsl/evaluateattributesnapped

Shadow texture dimensions now use the explicit rendering scale, independently
of the main viewport width. The general renderer's smaller diagnostic targets
otherwise attempted to create zero-sized shadow images.

Focused native checks use the production code and shaders:
- Fast wheel rotation: the previous linear method produced 9,600 interior
  missing pixels; hub transport produces zero, including the 4x MSAA case.
- Moving/disappearing sprite errors: zero.
- MSAA translation: previous centre-only coverage left 239 stray pixels at 4x;
  sample replay has zero stray pixels or holes at 2x, 4x and 8x.
- Perspective motion alignment: maximum error below 0.00012 pixel. Differences
  from a native re-render are confined to fractional silhouette coverage;
  there are no distant stray pixels or holes inside the surface.
- One-pixel lines in three orientations, textured surfaces and transparent HUD:
  zero error. Original endpoints, alpha holes, temporal jitter, shadow separation
  and independent two-car shadow placement also retain zero errors.
- These checks report zero D3D11 debug warnings and runtime shader compilations.
  Automated car-selection, race, crash, MSAA, FXAA and DLSS captures also report
  zero runtime shader compilations. Private evidence remains under
  build/checks/interpolation-surfaces-20261016/.

2026-10-16 geometric interpolation revision

Gameplay now derives correspondence from the original camera and mesh positions.
Original draw scopes at 85AC0, C4A70 and C33E0 identify cars and their parts;
the recompilation verifies the source bytes before adding these scopes. Mesh
content, part and instance identify matching draws. Stream output saves previous
and current positions during the original draw without changing its outputs.
Camera correspondence covers static surfaces; captured meshes replace it only
where their depth agrees with the original depth buffer, preserving alpha holes.
Both use the original rendering grid, including the original temporal jitter.
Full-resolution colour is projected with pixel footprints and surface depth.
Flat 4x4 regions share a quad; discontinuities retain individual pixel coverage.
This replaces colour confidence patches and circular splats in gameplay.

The projected shadow draw at B2530 multiplies the receiver colour by (1-shadow).
Its texture is reused between cars, so each car needs its own bounded snapshot.
Replaying the original draw against final scene depth recovers this attenuation
without darkening occluding cars. Removing it before scene interpolation and
interpolating the original world-to-shadow mapping makes shadows follow cars.
Both endpoint receiver meshes supply coverage, with stencil preventing duplicate
attenuation. Original fixed-function projection and raster offsets are preserved.
The native endpoint is unchanged; FXAA/upscaling filters the clean scene before
restoring the original shadow and clipped affine HUD layers.

All shaders remain ahead-of-time compiled. Bounded GPU histories avoid readback,
runtime shader compilation and per-frame allocation. The optical method described
below remains the fallback for scenes without a supported geometric camera;
earlier dated measurements describe the implementation at their stated date.

Validation of this revision (Windows, Ryzen 5 5600X, RTX 5060 Ti):
- Original target SHA256 B5207C40C11D7C5B5E129EF555F7632FA3584A4240BD0421C2B1B9AD9BFED7BF.
- Private native D3D11 probes use the production shaders and interpolation code.
  Vertical, horizontal and diagonal one-pixel lines, textured surfaces and
  transparent HUD: zero image error. Original geometry stream capture: unchanged
  native endpoints, zero visibility failures including alpha holes and temporal
  jitter at the upscaler's native input resolution. Projected shadow separation
  and midpoint: zero image error, including a second independently indexed car.
  All probes report zero D3D11 debug warnings and runtime shader compilations.
- --check-cpu passes 26,026 instruction, 1,551 memory, 6,744 floating-point and
  109 control cases; 36,149 compiled functions. CPU coverage is not expanded by
  the rendering metadata scopes.
- The existing --check-window image-only estimator fails identically on the
  saved baseline and this revision: diagonal error 1.110 (1449/720 mismatches),
  horizontal error 1.180 (1406/960). Its original assertions remain unchanged.
  It does not provide the geometry inputs exercised by the new native probes.
- Airport Terminal 3, widescreen, V-sync off, 2x resolution, 4x MSAA, 360 Hz:
  moving-race presentation increased from 299 to 320 frames/s; median measured
  GPU spans fell from 9.40 to 7.94 ms/source frame. CPU work median was 5.41 ->
  5.66 ms, with p99 improving from 9.70 to 7.49 ms. The source remains 60 Hz.
- Down Hill Demolition crash sequence, same settings: presentation increased
  from 296 to 330 frames/s, GPU median 9.61 -> 6.05 ms, CPU median 4.29 -> 4.31
  ms and CPU p99 9.27 -> 6.45 ms. Transparent crash overlays remain intact.
- Airport Terminal 3, DLSS, 2x output, 144 Hz: median GPU spans 9.69 -> 6.40 ms;
  source cadence remains 60 Hz. Native, MSAA, FXAA, DLSS and 3x MSAA captures
  were visually inspected. Moving cars, thin road furniture and projected
  shadows remain separate from the transparent gauges and text.
- Native 1x, 360 Hz selected, interpolation/V-sync off: repeated paired runs
  have approximately 3.31 ms median frame intervals (~300 FPS). One candidate
  run was 3.46 ms; repeating the unchanged binary returned 3.307 ms against
  3.317 ms baseline. There is no repeatable native regression in these runs;
  the project's sustained 360 FPS target is not established by this evidence.
- The new geometry/shadow histories use additional bounded memory: the 2x MSAA
  race target allocation was about 563 MiB versus 403 MiB baseline. The target
  budget now respects the adapter's available budget, capped at 2 GiB, so the
  existing 3x MSAA setting also fits. Disabling interpolation avoids these stores.
- F9 recordings lasted 5 seconds, except the paired moving-race recordings
  lasting approximately 8 seconds. Menu/loading automation preceded recording.
  Original user settings and saves were preserved; private automation copies
  and evidence are under build/checks/interpolation-surfaces-20261016/.

Geometric and ordinary shadow-containing frames reset their pairing when the
rendering mode changes. This prevents stripping a shadow before its geometry is
available. Scene-cut/uncovered-pixel fallback uses complete endpoint images,
including shadows and HUD. The method still cannot reconstruct unseen content;
scenes without supported geometric correspondence retain the image-only fallback.

With interpolation on, the GUI presents completed original frames at an
independent display rate and source flips stay at 60 Hz. With interpolation off,
source flips use the selected rate and each original frame is presented once.
The existing Xbox video callback stays at 60 Hz. Interpolation is enabled when
selecting a rate above 60 Hz; a manual opt-out persists until another rate is
selected. It adds approximately one source frame of display
delay: after the latest source frame arrives, display times traverse the
previous/latest pair.
Stalls over 100 ms, new sessions and enabling the feature reset its history.

Motion estimation follows iterative gradient-based image registration:
Lucas and Kanade, 1981, "An Iterative Image Registration Technique with an
Application to Stereo Vision".
https://publications.ri.cmu.edu/storage/publications/pub_files/pub3/lucas_bruce_d_1981_1/lucas_bruce_d_1981_1.pdf

Our implementation uses colour-aware local 5x5 windows and five RGB levels,
up to 640x480, 320x240, 160x120, 80x60 and 40x30, with six refinement iterations per level.
Coarse confidence survives weak fine-level gradients. Original-resolution
matching refines downsampled motion. A bounded source-frame pass uses nearby
bidirectionally verified motion with matching colour to support covered surfaces;
it does not mix different surfaces solely because their motion cells are adjacent.
Forward/backward endpoint checks and inverse-warp convergence reject unreliable
warps. Refinement keeps measured candidates and backs off worsening steps.
A bounded RGB scene-change reduction rejects unrelated image pairs, including
changes between colours with equal luminance. Missing motion uses the temporally
nearer endpoint. Intermediate frames warp both images into alignment. Only
geometrically aligned, closely matching samples are blended; otherwise a valid
warped source retains detail. Stationary sharp foreground details retain zero
motion even when their background moves.
Endpoint images are sampled directly. ImGui is composed after the game image.

Only native D3D11 image operations are added: game functions remain static,
ahead-of-time recompilations. All new shaders enter the existing build-time shader
bank. The disabled path makes no history copies and dispatches no motion passes.
It also stays inactive at presentation limits of 60 Hz or less.
History uses two full-resolution RGBA8 images plus bounded flow/RGB pyramid data.
Resolution scaling changes history size, not the motion grid or game timing.

Offline evidence is emitted by b2 --check-window: synthetic known translation,
sharp detail, independently moving surfaces, opaque/transparent stationary HUD,
exact endpoints, occlusion, scene changes and reset, plus GPU
component time and independently measured source/presentation rates. Actual game
quality/performance still requires manual checks in menu/race/crash scenes.
The method cannot reconstruct unseen geometry or ensure artifact-free fast motion.
Opt-in --frame game captures include previous/current window images and their
generated midpoint when interpolation is active, enabling inspection without
desktop automation.

2026-10-09 offline check on NVIDIA GeForce RTX 5060 Ti:
- Source cadence 60.000 Hz with unmodified presentation 120.009/144.022 Hz.
- The app's generated-frame path presents at 144.038 Hz with source still 60.000 Hz.
- Known (16,8)-pixel translation: generated midpoint matches the interior
  (8,4)-pixel reference to 8-bit rounding; stationary HUD and endpoints unchanged.
- Current pixels preserved for a newly appearing object and a black/white cut.
- GPU snapshot, luminance/motion and 640x480 warp: 0.195 ms for the measured pair.
- D3D11 debug messages absent and HLSL compilation count zero.
The Microsoft software renderer also passes the image checks, with 139.944 ms
component time; its high-rate timing cases use unmodified frames. These are
synthetic component checks, not game FPS measurements.

2026-10-10 manual opt-out pacing correction:
The user's 144 Hz/interpolation-off log b2-20261011-014158-17388.log reports
59.756 source FPS, 143.970 presented FPS and zero generated frames. The renderer
was disabled correctly, but App::game_flip always paced original frames at
60 Hz. The user explicitly requested original frames at the selected higher
rate with interpolation disabled, including the resulting movement speedup.
Choose the source pacing rate from the active mode: 60 for interpolation, the
selected rate otherwise. The disabled path presents only on original flips;
polling still handles input but does not present duplicate frames. Settings
changes during pacing re-evaluate the source rate without a catch-up burst.
The existing hidden-window diagnostic checks original 120/144 Hz pacing, the
unchanged interpolated 60/144 Hz path, and a live checkbox-path opt-out at
144 Hz with no generated or repeated images. These remain no-boot component
checks; live movement behavior still requires manual verification.

Validation: release build and hidden-window checks pass on RTX 5060 Ti and
Microsoft's software renderer. With interpolation off, original-frame cadence
is 120.000/144.000 Hz; hardware presentation is 120.021/144.025 Hz. A live
opt-out changes original-frame cadence to 143.999 Hz, generating no additional
images. With interpolation on, original frames remain 60.000 Hz and hardware
presentation is 144.031 Hz. No D3D11 warnings or runtime shader compilations.
Reports/images: build/checks/interpolation-opt-out. No game boot, computer use
or edits to saved player preferences; no owned workers survive the checks.

2026-10-12 moving-edge and sharpness audit:
The user clarified that "tearing" means distorted moving edges, not a horizontal
scanout split. Presentation/V-sync policy therefore stays unchanged.

Verified faults in the image path:
- Bilinear motion sampling mixed foreground/background displacement; the
  original 5x5 motion windows also crossed different coloured surfaces.
- The reverse check compared vectors at different correspondences and allowed
  1.5 coarse cells (6 native pixels, 18 pixels at 3x). Inverse iterations could
  oscillate at an edge without their projection back to the display being checked.
- A weak finest-level gradient discarded reliable coarse motion. A sampled
  (32,8) displacement had confidence 0.055 despite nearly zero residual and
  confidence 1 at a coarser level.
- Blending tolerated visibly mismatched detail. Unsupported regions jumped to
  current time while surrounding pixels were at the intermediate display time.
- Luminance-only matching/cut detection lost colour distinctions. A coarse
  grid could not keep one-pixel structures separate from their backgrounds.

The corrected path uses a native 640x480 motion grid with five bounded colour
levels, source-colour guidance, full-resolution refinement and a source-frame
support pass. That pass accepts only bidirectionally checked nearby motion from
compatible colours; measured correspondence and surface consensus resolve
ambiguous local fits. Covered pixels can retain that supported motion.
Each displayed warp must converge within 0.75 original-image pixels. Independent
endpoint checks, stationary sharp-detail handling, RGB cuts and selective
aligned blending preserve sharpness. Unknown motion uses the nearer endpoint.
All operations remain native D3D11 and all HLSL is compiled at build time.

Focused existing hidden-window diagnostic, RTX 5060 Ti / Ryzen 5 5600X:
- Sharp translated texture mean absolute error: 6.961 before, 0.033 after
  (8-bit colour units; latest-only 38.569, unwarped blend 32.027).
- Independently moving coloured foreground/background error: 5.375 before,
  0.429 after. Classified foreground perimeter: 816 before, 652 after;
  the exact reference is 480. Thin stationary white text over a moving
  background has zero error. Endpoints, reveal, reset and colour cuts pass.
- Warm publication plus one native warp timestamp span: 3.802 ms.
  This is a component measurement, not gameplay FPS. First-use driver work
  is reported separately; cold shader pipelines can add an initial hitch.
- Hardware source/display cadence: 59.974/144.130 Hz. Opt-out and presentation
  backpressure checks pass. No D3D11 debug warnings or runtime HLSL compilation.
- Microsoft's software renderer passes the same checks: detail 0.036,
  foreground/background 0.523, perimeter 666, stationary text exact. Its
  4737.415 ms warm component span is a correctness result, not a speed target.
- All 186 existing native rendering checks also pass.

Automated Airport Terminal 3, 1x native/widescreen/V-sync off:
- F9 diagnostic: 14.997877 seconds at 144 Hz with interpolation on, 899 source
  intervals and 2160 presentations. Source median 16.6667 ms, p99 17.1774 ms;
  GPU spans median 5.562080 ms, p99 6.733632 ms. 899 complete GPU frames and
  one pending result are explicit. Recorder losses, runtime HLSL compilation
  and audio overruns are zero. Whole-session presentation was 143.955 Hz.
- Standard frame-only benchmark: 14.9995351 seconds at 240 Hz with interpolation
  off: 222.958037 FPS, median 4.3457 ms, p99 5.7728 ms, max 6.4136 ms; no
  dropped records. The preceding build measured 223.851226 FPS. These remain
  consistent with the accepted overnight performance, not a sustained 240 claim.
- Both final recordings identify PE 6ACD1F82, image 80666624 bytes. Track RAM
  0x0048A150 is 2, confirmed by the Airport race images.
- Player settings were restored byte-for-byte: SHA256
  4A658E4F951426C9EB0B09A0347D4A88DEAC143F9E767F0C16E450D93BB3EF7B.

Live source/midpoint captures exposed remaining local distortion on fine
fencing, changing HUD glyphs and translucent tachometer pixels. The denser grid
improves the fencing, but two flattened images cannot separate every transparent
layer or reconstruct unseen geometry. These improvements are not a claim of
artifact-free interpolation. Game-provided motion/depth and separate HUD
composition would be required to remove those inherent ambiguities.

Evidence: build/checks/interpolation-audit/validation-summary.json, the preserved
baseline and final hardware/software images, and final game source/midpoint pairs.
Final detailed capture: Release/build/captures/performance-151390184500.
Final original-frame benchmark: Release/build/captures/benchmark-49493613400.
Intermediate images, helpers, backups and worker markers were removed after
checking exact owned process IDs and creation times. No owned workers remain;
Release contains only b2.exe and b2-tool.exe. The active overnight PGO profile,
player saves, private source media, knowledge and Git history were preserved.
