chore(render): Phase A8.F — strip ACDREAM_A8_DIAG_* step-disable flags (keep PROBE_VIS)
Task 0 baseline cleanup. Removes the temporary A8 step-disable diag toggles (A8Diag* properties + ACDREAM_A8_DIAG_* env reads) that the A8 batch left behind in RuntimeOptions, and unwraps their guards in GameWindow.RenderInsideOutAcdream so every guarded draw (Step 2 punch, Step 3 EnvCell-opaque + IndoorPass, Step 4 terrain + outdoor scenery, portal depth-clamp) now runs unconditionally. RuntimeOptionsTests drops the matching assertions. The ACDREAM_PROBE_VIS apparatus (EmitDrawOrderProbe / EmitStencilProbe / EmitBuildingsProbe / EmitEnvCellProbe) is preserved untouched. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
612400f998
commit
bb903bc157
3 changed files with 22 additions and 91 deletions
|
|
@ -11026,13 +11026,6 @@ public sealed class GameWindow : IDisposable
|
|||
|
||||
EmitBuildingsProbe(visibilityCellId: cameraCell.CellId, camBuildings, otherBuildings);
|
||||
|
||||
bool diagDisableStep4Terrain = _options.A8DiagDisableInsideStep4Terrain;
|
||||
bool diagDisableStep4Outdoor = _options.A8DiagDisableInsideStep4Outdoor;
|
||||
bool diagDisableStep3EnvCellOpaque = _options.A8DiagDisableInsideStep3EnvCellOpaque;
|
||||
bool diagDisableStep3IndoorPass = _options.A8DiagDisableInsideStep3IndoorPass;
|
||||
bool diagDisableStep2Punch = _options.A8DiagDisableInsideStep2Punch;
|
||||
bool diagDisablePortalDepthClamp = _options.A8DiagDisablePortalDepthClamp;
|
||||
|
||||
var visiblePortalCells = new System.Collections.Generic.List<AcDream.App.Rendering.LoadedCell>();
|
||||
if (visibleCellIds is not null)
|
||||
{
|
||||
|
|
@ -11073,23 +11066,20 @@ public sealed class GameWindow : IDisposable
|
|||
_indoorStencilPipeline!.DrawUploadedPortalMesh(
|
||||
viewProj,
|
||||
writeFarDepth: false,
|
||||
enableDepthClamp: !diagDisablePortalDepthClamp);
|
||||
enableDepthClamp: true);
|
||||
EmitStencilProbe(op: "mark-visible");
|
||||
|
||||
if (!diagDisableStep2Punch)
|
||||
{
|
||||
// Step 2: punch depth at portals.
|
||||
// WB VisibilityManager.cs:99-104
|
||||
gl.DepthMask(true);
|
||||
gl.DepthFunc(DepthFunction.Always);
|
||||
// Step 2: punch depth at portals.
|
||||
// WB VisibilityManager.cs:99-104
|
||||
gl.DepthMask(true);
|
||||
gl.DepthFunc(DepthFunction.Always);
|
||||
|
||||
EmitDrawOrderProbe(step: 2, sub: ' ');
|
||||
_indoorStencilPipeline!.DrawUploadedPortalMesh(
|
||||
viewProj,
|
||||
writeFarDepth: true,
|
||||
enableDepthClamp: !diagDisablePortalDepthClamp);
|
||||
EmitStencilProbe(op: "punch-visible");
|
||||
}
|
||||
EmitDrawOrderProbe(step: 2, sub: ' ');
|
||||
_indoorStencilPipeline!.DrawUploadedPortalMesh(
|
||||
viewProj,
|
||||
writeFarDepth: true,
|
||||
enableDepthClamp: true);
|
||||
EmitStencilProbe(op: "punch-visible");
|
||||
}
|
||||
|
||||
// Step 3: render the indoor cells visible from the camera cell
|
||||
|
|
@ -11118,8 +11108,7 @@ public sealed class GameWindow : IDisposable
|
|||
foreach (var id in visibleCellIds)
|
||||
currentEnvCellIds.Add(id);
|
||||
gl.Disable(EnableCap.Blend);
|
||||
if (!diagDisableStep3EnvCellOpaque)
|
||||
_envCellRenderer!.Render(AcDream.App.Rendering.Wb.WbRenderPass.Opaque, currentEnvCellIds);
|
||||
_envCellRenderer!.Render(AcDream.App.Rendering.Wb.WbRenderPass.Opaque, currentEnvCellIds);
|
||||
|
||||
// Transparency pass.
|
||||
gl.Enable(EnableCap.Blend);
|
||||
|
|
@ -11149,7 +11138,7 @@ public sealed class GameWindow : IDisposable
|
|||
// current cottage shell occludes any farther geometry. NO stencil: we
|
||||
// want the active building shell rendered unconditionally inside the
|
||||
// camera-building.
|
||||
if (camBuildings.Count > 0 && !diagDisableStep3IndoorPass)
|
||||
if (camBuildings.Count > 0)
|
||||
{
|
||||
_meshShader!.Use();
|
||||
_wbDrawDispatcher!.Draw(camera, _worldState.LandblockEntriesWithoutAnimatedIndex, frustum,
|
||||
|
|
@ -11183,28 +11172,18 @@ public sealed class GameWindow : IDisposable
|
|||
// convention. Step 4 enables culling before terrain, so temporarily
|
||||
// use terrain's own front-face convention or ground disappears through
|
||||
// indoor portal silhouettes.
|
||||
if (!diagDisableStep4Terrain)
|
||||
{
|
||||
gl.FrontFace(FrontFaceDirection.Ccw);
|
||||
_terrain?.Draw(camera, frustum, neverCullLandblockId: playerLb);
|
||||
gl.FrontFace(FrontFaceDirection.CW);
|
||||
}
|
||||
else
|
||||
{
|
||||
gl.FrontFace(FrontFaceDirection.CW);
|
||||
}
|
||||
gl.FrontFace(FrontFaceDirection.Ccw);
|
||||
_terrain?.Draw(camera, frustum, neverCullLandblockId: playerLb);
|
||||
gl.FrontFace(FrontFaceDirection.CW);
|
||||
|
||||
_meshShader!.Use();
|
||||
// Scenery + static objects via dispatcher (WB lines 148-154).
|
||||
if (!diagDisableStep4Outdoor)
|
||||
{
|
||||
_wbDrawDispatcher!.Draw(camera, _worldState.LandblockEntriesWithoutAnimatedIndex, frustum,
|
||||
neverCullLandblockId: playerLb,
|
||||
visibleCellIds: visibleCellIds, // OK - outdoor cells outside the building
|
||||
animatedEntityIds: null,
|
||||
set: AcDream.App.Rendering.Wb.WbDrawDispatcher.EntitySet.OutdoorScenery);
|
||||
_a8PerfLastStaticStats = _wbDrawDispatcher.LastDrawStats;
|
||||
}
|
||||
_wbDrawDispatcher!.Draw(camera, _worldState.LandblockEntriesWithoutAnimatedIndex, frustum,
|
||||
neverCullLandblockId: playerLb,
|
||||
visibleCellIds: visibleCellIds, // OK - outdoor cells outside the building
|
||||
animatedEntityIds: null,
|
||||
set: AcDream.App.Rendering.Wb.WbDrawDispatcher.EntitySet.OutdoorScenery);
|
||||
_a8PerfLastStaticStats = _wbDrawDispatcher.LastDrawStats;
|
||||
}
|
||||
|
||||
// Step 5: per-other-building 3-bit stencil pipeline.
|
||||
|
|
|
|||
|
|
@ -39,12 +39,6 @@ public sealed record RuntimeOptions(
|
|||
bool RetailCloseDegrades,
|
||||
bool DumpSceneryZ,
|
||||
bool DumpLiveSpawns,
|
||||
bool A8DiagDisableInsideStep4Terrain,
|
||||
bool A8DiagDisableInsideStep4Outdoor,
|
||||
bool A8DiagDisableInsideStep3EnvCellOpaque,
|
||||
bool A8DiagDisableInsideStep3IndoorPass,
|
||||
bool A8DiagDisableInsideStep2Punch,
|
||||
bool A8DiagDisablePortalDepthClamp,
|
||||
int? LegacyStreamRadius)
|
||||
{
|
||||
/// <summary>
|
||||
|
|
@ -85,18 +79,6 @@ public sealed record RuntimeOptions(
|
|||
RetailCloseDegrades: !string.Equals(env("ACDREAM_RETAIL_CLOSE_DEGRADES"), "0", StringComparison.Ordinal),
|
||||
DumpSceneryZ: IsExactlyOne(env("ACDREAM_DUMP_SCENERY_Z")),
|
||||
DumpLiveSpawns: IsExactlyOne(env("ACDREAM_DUMP_LIVE_SPAWNS")),
|
||||
A8DiagDisableInsideStep4Terrain:
|
||||
IsExactlyOne(env("ACDREAM_A8_DIAG_DISABLE_INSIDE_STEP4_TERRAIN")),
|
||||
A8DiagDisableInsideStep4Outdoor:
|
||||
IsExactlyOne(env("ACDREAM_A8_DIAG_DISABLE_INSIDE_STEP4_OUTDOOR")),
|
||||
A8DiagDisableInsideStep3EnvCellOpaque:
|
||||
IsExactlyOne(env("ACDREAM_A8_DIAG_DISABLE_INSIDE_STEP3_ENVCELL_OPAQUE")),
|
||||
A8DiagDisableInsideStep3IndoorPass:
|
||||
IsExactlyOne(env("ACDREAM_A8_DIAG_DISABLE_INSIDE_STEP3_INDOORPASS")),
|
||||
A8DiagDisableInsideStep2Punch:
|
||||
IsExactlyOne(env("ACDREAM_A8_DIAG_DISABLE_INSIDE_STEP2_PUNCH")),
|
||||
A8DiagDisablePortalDepthClamp:
|
||||
IsExactlyOne(env("ACDREAM_A8_DIAG_DISABLE_PORTAL_DEPTH_CLAMP")),
|
||||
// Legacy override for ACDREAM_STREAM_RADIUS. Caller applies it on
|
||||
// top of the quality preset's radii. Null when unset or invalid.
|
||||
LegacyStreamRadius: TryParseNonNegativeInt(env("ACDREAM_STREAM_RADIUS")));
|
||||
|
|
|
|||
|
|
@ -37,12 +37,6 @@ public sealed class RuntimeOptionsTests
|
|||
// Default-on: RetailCloseDegrades is true unless explicitly disabled.
|
||||
Assert.True(opts.RetailCloseDegrades);
|
||||
Assert.False(opts.DumpSceneryZ);
|
||||
Assert.False(opts.A8DiagDisableInsideStep4Terrain);
|
||||
Assert.False(opts.A8DiagDisableInsideStep4Outdoor);
|
||||
Assert.False(opts.A8DiagDisableInsideStep3EnvCellOpaque);
|
||||
Assert.False(opts.A8DiagDisableInsideStep3IndoorPass);
|
||||
Assert.False(opts.A8DiagDisableInsideStep2Punch);
|
||||
Assert.False(opts.A8DiagDisablePortalDepthClamp);
|
||||
Assert.Null(opts.LegacyStreamRadius);
|
||||
Assert.False(opts.HasLiveCredentials);
|
||||
}
|
||||
|
|
@ -190,24 +184,12 @@ public sealed class RuntimeOptionsTests
|
|||
["ACDREAM_NO_AUDIO"] = "1",
|
||||
["ACDREAM_ENABLE_SKY_PES"] = "1",
|
||||
["ACDREAM_DUMP_SCENERY_Z"] = "1",
|
||||
["ACDREAM_A8_DIAG_DISABLE_INSIDE_STEP4_TERRAIN"] = "1",
|
||||
["ACDREAM_A8_DIAG_DISABLE_INSIDE_STEP4_OUTDOOR"] = "1",
|
||||
["ACDREAM_A8_DIAG_DISABLE_INSIDE_STEP3_ENVCELL_OPAQUE"] = "1",
|
||||
["ACDREAM_A8_DIAG_DISABLE_INSIDE_STEP3_INDOORPASS"] = "1",
|
||||
["ACDREAM_A8_DIAG_DISABLE_INSIDE_STEP2_PUNCH"] = "1",
|
||||
["ACDREAM_A8_DIAG_DISABLE_PORTAL_DEPTH_CLAMP"] = "1",
|
||||
}));
|
||||
Assert.True(allOn.DevTools);
|
||||
Assert.True(allOn.DumpMoveTruth);
|
||||
Assert.True(allOn.NoAudio);
|
||||
Assert.True(allOn.EnableSkyPesDebug);
|
||||
Assert.True(allOn.DumpSceneryZ);
|
||||
Assert.True(allOn.A8DiagDisableInsideStep4Terrain);
|
||||
Assert.True(allOn.A8DiagDisableInsideStep4Outdoor);
|
||||
Assert.True(allOn.A8DiagDisableInsideStep3EnvCellOpaque);
|
||||
Assert.True(allOn.A8DiagDisableInsideStep3IndoorPass);
|
||||
Assert.True(allOn.A8DiagDisableInsideStep2Punch);
|
||||
Assert.True(allOn.A8DiagDisablePortalDepthClamp);
|
||||
|
||||
// Any non-"1" value leaves them off, matching the
|
||||
// string.Equals(env, "1", StringComparison.Ordinal) check.
|
||||
|
|
@ -218,24 +200,12 @@ public sealed class RuntimeOptionsTests
|
|||
["ACDREAM_NO_AUDIO"] = "2",
|
||||
["ACDREAM_ENABLE_SKY_PES"] = "on",
|
||||
["ACDREAM_DUMP_SCENERY_Z"] = " 1",
|
||||
["ACDREAM_A8_DIAG_DISABLE_INSIDE_STEP4_TERRAIN"] = "true",
|
||||
["ACDREAM_A8_DIAG_DISABLE_INSIDE_STEP4_OUTDOOR"] = "yes",
|
||||
["ACDREAM_A8_DIAG_DISABLE_INSIDE_STEP3_ENVCELL_OPAQUE"] = "2",
|
||||
["ACDREAM_A8_DIAG_DISABLE_INSIDE_STEP3_INDOORPASS"] = " 1",
|
||||
["ACDREAM_A8_DIAG_DISABLE_INSIDE_STEP2_PUNCH"] = "true",
|
||||
["ACDREAM_A8_DIAG_DISABLE_PORTAL_DEPTH_CLAMP"] = "yes",
|
||||
}));
|
||||
Assert.False(anyOther.DevTools);
|
||||
Assert.False(anyOther.DumpMoveTruth);
|
||||
Assert.False(anyOther.NoAudio);
|
||||
Assert.False(anyOther.EnableSkyPesDebug);
|
||||
Assert.False(anyOther.DumpSceneryZ);
|
||||
Assert.False(anyOther.A8DiagDisableInsideStep4Terrain);
|
||||
Assert.False(anyOther.A8DiagDisableInsideStep4Outdoor);
|
||||
Assert.False(anyOther.A8DiagDisableInsideStep3EnvCellOpaque);
|
||||
Assert.False(anyOther.A8DiagDisableInsideStep3IndoorPass);
|
||||
Assert.False(anyOther.A8DiagDisableInsideStep2Punch);
|
||||
Assert.False(anyOther.A8DiagDisablePortalDepthClamp);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue