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:
Erik 2026-05-29 11:25:00 +02:00
parent 612400f998
commit bb903bc157
3 changed files with 22 additions and 91 deletions

View file

@ -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.