acdream/docs/research/evidence/vm0/baseline-configdir.patch
Erik 30e72a2af8 research(vm0): Campaign AR's pack-off path IS the pre-campaign renderer - PASS
Exact-pixel and production-perf comparison of 6c79d35c (+ only the A2
normal files, so no terrain mask is needed) against c51b07ef with no pack:
connected as +Acdream, visible window, one isolated config clone per
variant, pinned clocks. Open field: the only differences are idle pose,
mana digits and a passing flyer. Holtburg: same-binary-twice defines the
dynamic mask (9.8%); in the static 90% both self-diffs have ZERO pixels
with |d|>=8 while base+normals vs HEAD-off has 841/729 - all streaks inside
the animated lifestone. Buildings, ground, trees, sky and UI are clean.

Perf (uncapped Release, no automation observer, ACDREAM_FRAME_PROF=1):
Holtburg CPU p50 4.7 -> 4.1 ms, Arwic 6.0 -> 5.2 ms, GPU unchanged,
alloc/frame 574 KB -> 21 KB. No regression; F5b's '27.8 ms retail CPU' was
the observer.

Three false alarms recorded so nobody repeats them: the isolated gate
settings lack fieldOfView (90 vs the real 86.33 -> a 0.952 zoom); the real
%APPDATA% settings still selected acdream.atmospheric/low (pack ON); a
minimized GLFW window is throttled and never settles.

Tools: tools/vm0/capture-visible.ps1 (pre-campaign gate + -Exe/-Live/
-ConfigDir/-CharacterName/-PreCaptureCommand), tools/vm0/perf-run.sh,
and -BuildingDetailTextures on run-offline-pixel-gate.ps1. Baseline
patches under docs/research/evidence/vm0/.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-22 21:40:40 +02:00

31 lines
1.3 KiB
Diff

diff --git a/src/AcDream.Platform/ApplicationPathSet.cs b/src/AcDream.Platform/ApplicationPathSet.cs
index a6743ad1..76e3a1f5 100644
--- a/src/AcDream.Platform/ApplicationPathSet.cs
+++ b/src/AcDream.Platform/ApplicationPathSet.cs
@@ -72,6 +72,16 @@ public sealed record ApplicationPathSet(
{
platform ??= ApplicationPathEnvironment.Instance;
+ // Explicit method/CLI arguments remain authoritative. The environment
+ // seam lets graphical automation and portable installations isolate
+ // all mutable user state without rewriting the real user's settings.
+ configDirectory ??= NonEmpty(
+ platform.GetEnvironmentVariable("ACDREAM_CONFIG_DIR"));
+ dataDirectory ??= NonEmpty(
+ platform.GetEnvironmentVariable("ACDREAM_DATA_DIR"));
+ cacheDirectory ??= NonEmpty(
+ platform.GetEnvironmentVariable("ACDREAM_CACHE_DIR"));
+
string config;
string data;
string cache;
@@ -140,6 +150,9 @@ public sealed record ApplicationPathSet(
return Path.Combine(root, leaf);
}
+ private static string? NonEmpty(string? value) =>
+ string.IsNullOrWhiteSpace(value) ? null : value;
+
private static string RequireFolder(
IApplicationPathEnvironment platform,
Environment.SpecialFolder folder)