acdream/src/AcDream.App
Erik f143ece317 fix(render): Phase A8 — skip line-7200 terrain when cameraInsideBuilding
User report after Step 5 disable + cull-cache fix: "Cant see anything,
flickering colors, sometimes textures sometimes inside, house missing
lots of walls. 10 FPS. GPU 100%."

Root cause: terrain was being drawn TWICE per indoor frame:
1. Line 7283 _terrain.Draw — UNCONDITIONAL pre-A8 pass; writes full-
   screen terrain color + depth at terrain Z.
2. Step 4 inside RenderInsideOutAcdream — stencil-gated terrain at
   portal silhouettes only (matching WB VisibilityManager:143).

Pre-A8 papered over the Z conflict with a depth-clear-if-inside
workaround (cleared depth between terrain and cottage) which we
DELETED as part of Wave 4. Without it, when Step 3 writes the cell
geometry with DepthFunc.Less, the cottage walls at Z=92-94 (where
they meet the ground) Z-FIGHT against the terrain already in the
depth buffer from pass 1. Symptom: flickering walls + missing
sections + GPU saturated drawing terrain twice.

Fix: gate the line-7200 terrain draw on `!cameraInsideBuilding`.
When indoor, Step 4 is the SOLE terrain pass — stencil-gated to
portal silhouettes only. No double-draw, no Z-fighting, no need
for the deleted depth-clear workaround.

Outdoor mode unchanged (pass 1 still fires, Step 4 isn't taken).

Build green.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-27 16:14:13 +02:00
..
Audio feat(audio): Phase E.2 OpenAL engine + SoundTable cookbook + hook wiring 2026-04-18 16:38:26 +02:00
Input fix(physics): close #77 — auto-walk honors ACE CanCharge bit; zero velocity in turn-in-place 2026-05-18 09:33:33 +02:00
Net refactor(app): extract LiveSessionController for network-side session lifecycle (Step 2) 2026-05-17 16:15:57 +02:00
Plugins feat(core): add IGameState, IEvents, WorldEvents with replay-on-subscribe 2026-04-10 20:29:29 +02:00
Rendering fix(render): Phase A8 — skip line-7200 terrain when cameraInsideBuilding 2026-05-27 16:14:13 +02:00
Streaming refactor: #100 — remove hiddenTerrainCells / BuildingTerrainCells plumbing 2026-05-25 21:37:53 +02:00
UI feat(retail): Commit B — retail-faithful AP cadence + screen-rect picker 2026-05-16 13:56:08 +02:00
AcDream.App.csproj feat(O-T7): drop WB project references; complete extraction 2026-05-21 17:17:33 +02:00
Program.cs refactor(app): extract typed RuntimeOptions for startup env vars (Step 1) 2026-05-17 09:16:55 +02:00
RuntimeOptions.cs refactor(app): extract typed RuntimeOptions for startup env vars (Step 1) 2026-05-17 09:16:55 +02:00