acdream/src/AcDream.Core/Rendering/RenderingDiagnostics.cs
Erik bf53e2ad6e refactor(rendering): delete superseded visibility probes
Delete the callerless portal-BFS research graph and spent renderer probe families while retaining the production RetailFrameWalk path, terrain diagnostics, membership invariant, and walk transcript.

Mutation evidence (all restored):

1. Restored PortalVisibilityBuilder type -> AppAssembly_ContainsNoSupersededPortalGraphTypes first failed Assert.Empty with AcDream.App.Rendering.PortalVisibilityBuilder.

2. Restored ACDREAM_PROBE_FACILITY_STAIRS -> ProductionSource_ContainsNoDeletedRendererProbe_AndRetainsWalkTranscriptProof first failed Assert.Empty on RenderingDiagnostics.cs.

3. Added a second RetailFrameWalk field -> WalkFrameOwners_AreUnique first failed Assert.Single with _frameWalk and _mutatedSecondFrameWalk.

4. Added OrderBy to OrderedStream -> OrderedWalkStream_HasNoCrossStreamReorder first failed Assert.DoesNotContain on OrderBy(.

5. Added IDatReaderWriter parameter -> FrameTimeWalkOwners_HaveNoRawDatDependency first failed Assert.Empty on RetailFrameWalk.MutatedRawDatParameter.
2026-09-05 05:18:17 +02:00

44 lines
1.7 KiB
C#

using System.Globalization;
namespace AcDream.Core.Rendering;
/// <summary>Permanent rendering diagnostics and retail render-route helpers.</summary>
public static class RenderingDiagnostics
{
/// <summary>
/// #176 stripe-hunt shader isolation mode. Zero disables the override;
/// values 1-3 retain the established lighting diagnostic modes.
/// </summary>
public static int LightDebugMode { get; set; } =
int.TryParse(
Environment.GetEnvironmentVariable("ACDREAM_LIGHT_DEBUG"),
NumberStyles.Integer,
CultureInfo.InvariantCulture,
out int mode)
? mode
: 0;
/// <summary>Returns true for AC indoor EnvCell ids.</summary>
public static bool IsEnvCellId(ulong id) => (id & 0xFFFFu) >= 0x0100u;
/// <summary>
/// Retail chooses the indoor path from the player's cell, provided the
/// transition-owned render root is available.
/// </summary>
public static bool ShouldRenderIndoor(uint playerCellId, bool renderRootResolved)
=> renderRootResolved && IsEnvCellId(playerCellId);
/// <summary>Permanent frame-profiler toggle.</summary>
public static bool FrameProfEnabled { get; set; } =
Environment.GetEnvironmentVariable("ACDREAM_FRAME_PROF") == "1";
/// <summary>Optional per-frame CSV history path for the frame profiler.</summary>
public static string? FrameHistoryPath { get; } =
Environment.GetEnvironmentVariable("ACDREAM_FRAME_HISTORY");
/// <summary>
/// Print-only production walk transcript gate. RuntimeOptions owns the
/// sole environment read and assigns this property during construction.
/// </summary>
public static bool DumpWalkTranscriptEnabled { get; set; }
}