aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorValentin Popov <valentin@popov.link>2026-07-18 17:47:14 +0300
committerValentin Popov <valentin@popov.link>2026-07-18 17:47:14 +0300
commitfd9c04cade712dd41011c0da3ba10086799d61cf (patch)
tree57fba3165ec2f7f86a7607d69491ffe71c5e50c1 /docs
parent4967f58af49627862355660428d73880769f59d2 (diff)
downloadfparkan-fd9c04cade712dd41011c0da3ba10086799d61cf.tar.xz
fparkan-fd9c04cade712dd41011c0da3ba10086799d61cf.zip
feat(tools): capture live legacy camera
Diffstat (limited to 'docs')
-rw-r--r--docs/tomes/05-render.md31
1 files changed, 31 insertions, 0 deletions
diff --git a/docs/tomes/05-render.md b/docs/tomes/05-render.md
index a32d68c..25225d8 100644
--- a/docs/tomes/05-render.md
+++ b/docs/tomes/05-render.md
@@ -1498,6 +1498,37 @@ errors. This validates the offline handoff for one captured instant; it does
not claim live camera tracking, material parity, or an original-frame pixel
comparison.
+`tools/capture-original-camera.ps1` makes that handoff repeatable for a live
+GOG process. It finds the actual `Terrain.dll` base with Toolhelp module
+enumeration, opens the chosen PID with only
+`PROCESS_QUERY_INFORMATION | PROCESS_VM_READ`, reads the camera global at its
+RVA and then exactly 64 matrix bytes at interface `+32`. It emits the
+`fparkan-legacy-camera-v1` JSON accepted by `fparkan-game`; it does not write
+to the process, send window messages, inject code, suspend threads, or invoke
+an original method. PowerShell execution policy may require the explicit
+one-shot bypass below; that changes neither the script nor the game.
+
+```powershell
+$capture = powershell -NoProfile -ExecutionPolicy Bypass -File `
+ .\tools\capture-original-camera.ps1 -ProcessId 5632
+$capture | Set-Content -NoNewline target\fparkan\live-camera.json
+cargo run -q -p fparkan-game -- --root 'C:\GOG Games\Parkan - Iron Strategy' `
+ --mission 'MISSIONS\Autodemo.00\data.tma' --backend static-vulkan --frames 3 `
+ --legacy-camera-capture target\fparkan\live-camera.json `
+ --readback-out target\fparkan\autodemo-live-camera.raw
+```
+
+On the unattended live AutoDemo the tool produced a new finite matrix and the
+same all-root static bridge completed with 46 clip-visible vertices, 71
+descriptors, a 7,372,800-byte format-50 readback, FNV-1a
+`11081931966175262997`, and zero Vulkan validation warnings/errors. A passive
+desktop-surface capture of that original window also proved that the selected
+instant contains the textured terrain, atmospheric sky, HUD and weapon FX;
+`PrintWindow` itself returns a black Direct3D buffer, so it must not be treated
+as an original-frame oracle. Neither screenshot establishes pixel parity: HUD,
+FX, lighting, terrain layer composition and the remaining scene objects are
+not yet represented by the static bridge.
+
For visual regression work, `fparkan-game --backend static-vulkan` also accepts
`--readback-out <path>`. It writes the final synchronized Vulkan readback bytes
only after the renderer has completed its normal teardown evidence; the JSON