feat(render): Phase A8 — RenderingDiagnostics.ProbeVisibilityEnabled
Adds the ACDREAM_PROBE_VIS=1 env-var-toggleable flag for the indoor-cell visibility culling pipeline (#78). Mirrors the existing ProbeIndoor* pattern. DebugVM checkbox follows. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
d834188a4e
commit
6577c0a21c
3 changed files with 48 additions and 0 deletions
|
|
@ -76,6 +76,16 @@ public static class RenderingDiagnostics
|
|||
Environment.GetEnvironmentVariable("ACDREAM_PROBE_INDOOR_CULL") == "1"
|
||||
|| Environment.GetEnvironmentVariable("ACDREAM_PROBE_INDOOR_ALL") == "1";
|
||||
|
||||
/// <summary>
|
||||
/// Phase A8 (2026-05-25): when true, the indoor-cell stencil pipeline
|
||||
/// emits one <c>[vis]</c> line per frame: camera-inside-cell flag,
|
||||
/// VisibleCellIds count, HasExitPortalVisible flag, portal triangle
|
||||
/// count uploaded, and which outdoor passes were stencil-gated.
|
||||
/// Initial state from <c>ACDREAM_PROBE_VIS=1</c>.
|
||||
/// </summary>
|
||||
public static bool ProbeVisibilityEnabled { get; set; } =
|
||||
Environment.GetEnvironmentVariable("ACDREAM_PROBE_VIS") == "1";
|
||||
|
||||
/// <summary>
|
||||
/// Master toggle. Reading reflects the AND of all five flags
|
||||
/// (true only when every probe is on). Writing cascades — setting
|
||||
|
|
|
|||
|
|
@ -345,6 +345,17 @@ public sealed class DebugVM
|
|||
set => RenderingDiagnostics.ProbeIndoorCullEnabled = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Phase A8 (2026-05-25). Runtime mirror of
|
||||
/// <c>RenderingDiagnostics.ProbeVisibilityEnabled</c>
|
||||
/// (env var <c>ACDREAM_PROBE_VIS</c>).
|
||||
/// </summary>
|
||||
public bool ProbeVisibility
|
||||
{
|
||||
get => RenderingDiagnostics.ProbeVisibilityEnabled;
|
||||
set => RenderingDiagnostics.ProbeVisibilityEnabled = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Indoor walking Phase 1 (2026-05-19). Runtime mirror of
|
||||
/// <c>PhysicsDiagnostics.ProbeIndoorBspEnabled</c> (env var
|
||||
|
|
|
|||
|
|
@ -0,0 +1,27 @@
|
|||
// Phase A8 — visibility probe flag tests.
|
||||
|
||||
using System;
|
||||
using AcDream.Core.Rendering;
|
||||
using Xunit;
|
||||
|
||||
namespace AcDream.Core.Tests.Rendering;
|
||||
|
||||
public class RenderingDiagnosticsVisibilityTests
|
||||
{
|
||||
[Fact]
|
||||
public void ProbeVisibilityEnabled_CanBeToggled()
|
||||
{
|
||||
var prev = RenderingDiagnostics.ProbeVisibilityEnabled;
|
||||
try
|
||||
{
|
||||
RenderingDiagnostics.ProbeVisibilityEnabled = true;
|
||||
Assert.True(RenderingDiagnostics.ProbeVisibilityEnabled);
|
||||
RenderingDiagnostics.ProbeVisibilityEnabled = false;
|
||||
Assert.False(RenderingDiagnostics.ProbeVisibilityEnabled);
|
||||
}
|
||||
finally
|
||||
{
|
||||
RenderingDiagnostics.ProbeVisibilityEnabled = prev;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue