acdream/src/AcDream.App/Rendering/Wb
Erik 5dc4140c11 feat(render): Phase A8 — indoor visibility + streaming fixes batch
Lands the working A8 indoor-rendering and streaming fixes accumulated this
session. User has verified these visually to some degree (e.g. lifestone /
translucent meshes confirmed fine under the FrontFace flip; bridge / wall /
collision regressions confirmed fixed after travel); not every path has been
exhaustively gated. The cellar-flap defect remains OPEN and will be solved
the retail-faithful way via a dedicated brainstorm (see handoff docs).

Rendering core (reviewed, high confidence):
- EnvCellRenderer SSBO stride fix: upload packed Matrix4x4[] (64B) instead of
  the 80B CPU InstanceData struct the shader never expected — fixes the
  transform/texture "explosion" for any draw with >1 instance (cells that
  dedupe to a shared cellGeomId). Real root cause.
- WB-style global FrontFace(CW) + per-batch CullMode carried through the MDI
  layout (GroupKey + BuildIndirectArrays + DrawIndirectRange split into
  same-cull runs with absolute uDrawIDOffset per run).
- EntitySet partitioning (IndoorPass / OutdoorScenery / LiveDynamic) +
  WorldEntity.BuildingShellAnchorCellId so building shells scope to their
  dat-derived building cell instead of rendering everywhere.
- RenderOutsideInAcdream (look into buildings from outside) +
  CollectVisiblePortalBuildings frustum cull of portal bounds.
- Sky-when-inside-building + per-cell audit probe + GL-state probe.

Streaming / perf (test-covered; not independently code-reviewed this session):
- Near/far priority queues so near work wins over far; PromoteToNear carries
  full landblock + mesh data; LandblockEntriesWithoutAnimatedIndex avoids
  rebuilding the animated-lookup dict in the hot draw path. Fixes the
  bridge-not-appearing / missing-walls / broken-collision-after-travel
  regressions and improves post-transition FPS.

Tooling + docs:
- tools/A8CellAudit: offline dat cell/portal/building dumper (portals +
  buildings modes) — reproduces the cellar-flap investigation with no launch.
- docs/research cellar-flap root-cause + option-2 handoff (the didInsideStencil
  double-duty finding + the WB-recursive design decision + brainstorm prompt),
  entity-taxonomy, replan, issue-78 visibility investigation.

Diagnostics retained on purpose: ACDREAM_A8_DIAG_* gates, portal_stencil.vert
provisional pos.w clamp, and the probe families are kept (env-var gated, zero
cost when off) because the pending option-2 cellar-flap brainstorm needs them.
Strip in the option-2 ship commit.

Indoor branch stays behind ACDREAM_A8_INDOOR_BRANCH=1 (default off = pre-A8
visual). Build green; App tests + Core (streaming/dispatcher/loader) tests pass.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-29 10:14:50 +02:00
..
AcSurfaceMetadata.cs phase(N.4): AcSurfaceMetadata side-table for WB-pristine surface props 2026-05-08 13:08:56 +02:00
AcSurfaceMetadataTable.cs phase(N.4): AcSurfaceMetadata side-table for WB-pristine surface props 2026-05-08 13:08:56 +02:00
ActiveParticleEmitter.cs feat(O-T7): drop WB project references; complete extraction 2026-05-21 17:17:33 +02:00
AnimatedEntityState.cs phase(N.4) Tasks 16+18+19: AnimatedEntityState + AnimPartChange + HiddenParts 2026-05-08 14:37:09 +02:00
BindlessSupport.cs fix(N.5b): black terrain — switch to uvec2 handle + sampler constructor 2026-05-09 12:53:21 +02:00
BufferUsageExtensions.cs feat(O-T3): extract GL infrastructure to AcDream.App 2026-05-21 16:00:31 +02:00
Building.cs feat(render): Phase A8 — indoor visibility + streaming fixes batch 2026-05-29 10:14:50 +02:00
BuildingLoader.cs feat(render): Phase A8 — indoor visibility + streaming fixes batch 2026-05-29 10:14:50 +02:00
BuildingRegistry.cs feat(render): Phase A8 RR3 — Building + BuildingRegistry + BuildingLoader 2026-05-27 11:08:43 +02:00
CachedBatch.cs feat(render #53): EntityClassificationCache skeleton + first test 2026-05-10 17:23:37 +02:00
DatCollectionAdapter.cs feat(O-T7): drop WB project references; complete extraction 2026-05-21 17:17:33 +02:00
DebugRenderSettings.cs feat(O-T3): extract GL infrastructure to AcDream.App 2026-05-21 16:00:31 +02:00
DrawElementsIndirectCommand.cs phase(N.5) Task 7: dispatcher SSBO + indirect buffer infrastructure 2026-05-08 20:25:29 +02:00
EdgeLineBuilder.cs feat(O-T4): extract ObjectMeshManager + mesh pipeline closure into AcDream.App.Rendering.Wb 2026-05-21 16:37:55 +02:00
EmbeddedResourceReader.cs fix(O-T4): address spec-review findings — InstanceData + using cleanups 2026-05-21 16:50:05 +02:00
EntityClassificationCache.cs fix(render #53): key cache by (entityId, landblockHint) to defeat ID collision 2026-05-10 23:02:14 +02:00
EntitySpawnAdapter.cs feat(A.5 T18): use cached WorldEntity AABB in dispatcher; populate at register 2026-05-10 08:20:20 +02:00
EnvCellRenderer.cs feat(render): Phase A8 — indoor visibility + streaming fixes batch 2026-05-29 10:14:50 +02:00
EnvCellSceneryInstance.cs feat(render): Phase A8 Wave 1 — WB scaffolding extraction + stencil low-level method 2026-05-27 14:46:07 +02:00
EnvCellVisibilitySnapshot.cs fix(render): Phase A8 — pool aliasing in EnvCellRenderer (visual chaos root cause) 2026-05-27 19:08:49 +02:00
GeometryUtils.cs feat(O-T7): drop WB project references; complete extraction 2026-05-21 17:17:33 +02:00
GLHelpers.cs feat(O-T3): extract GL infrastructure to AcDream.App 2026-05-21 16:00:31 +02:00
GlobalMeshBuffer.cs feat(O-T4): extract ObjectMeshManager + mesh pipeline closure into AcDream.App.Rendering.Wb 2026-05-21 16:37:55 +02:00
GLSLShader.cs feat(O-T3): extract GL infrastructure to AcDream.App 2026-05-21 16:00:31 +02:00
GLStateScope.cs feat(O-T3): extract GL infrastructure to AcDream.App 2026-05-21 16:00:31 +02:00
GpuMemoryTracker.cs feat(O-T3): extract GL infrastructure to AcDream.App 2026-05-21 16:00:31 +02:00
GroupKey.cs feat(render): Phase A8 — indoor visibility + streaming fixes batch 2026-05-29 10:14:50 +02:00
IDatReaderWriter.cs chore(O-T7): code-review housekeeping after WB extraction 2026-05-21 17:29:06 +02:00
InstanceData.cs fix(O-T4): address spec-review findings — InstanceData + using cleanups 2026-05-21 16:50:05 +02:00
ITextureCachePerInstance.cs phase(N.4) Task 17: EntitySpawnAdapter for server-spawned per-instance content 2026-05-08 14:46:34 +02:00
IWbMeshAdapter.cs phase(N.4): WbMeshAdapter stub + IWbMeshAdapter interface 2026-05-08 13:18:50 +02:00
LandblockSpawnAdapter.cs feat(render): Phase A8 — indoor visibility + streaming fixes batch 2026-05-29 10:14:50 +02:00
ManagedGLFrameBuffer.cs feat(O-T3): extract GL infrastructure to AcDream.App 2026-05-21 16:00:31 +02:00
ManagedGLIndexBuffer.cs feat(O-T7): drop WB project references; complete extraction 2026-05-21 17:17:33 +02:00
ManagedGLTexture.cs feat(O-T7): drop WB project references; complete extraction 2026-05-21 17:17:33 +02:00
ManagedGLTextureArray.cs feat(O-T7): drop WB project references; complete extraction 2026-05-21 17:17:33 +02:00
ManagedGLUniformBuffer.cs feat(O-T3): extract GL infrastructure to AcDream.App 2026-05-21 16:00:31 +02:00
ManagedGLVertexArray.cs feat(O-T3): extract GL infrastructure to AcDream.App 2026-05-21 16:00:31 +02:00
ManagedGLVertexBuffer.cs feat(O-T3): extract GL infrastructure to AcDream.App 2026-05-21 16:00:31 +02:00
ModernRenderData.cs feat(O-T4): extract ObjectMeshManager + mesh pipeline closure into AcDream.App.Rendering.Wb 2026-05-21 16:37:55 +02:00
ObjectMeshManager.cs feat(O-T7): drop WB project references; complete extraction 2026-05-21 17:17:33 +02:00
OpenGLGraphicsDevice.cs fix(O-T4): address spec-review findings — InstanceData + using cleanups 2026-05-21 16:50:05 +02:00
ParticleBatcher.cs feat(O-T7): drop WB project references; complete extraction 2026-05-21 17:17:33 +02:00
ParticleEmitterRenderer.cs feat(O-T4): extract ObjectMeshManager + mesh pipeline closure into AcDream.App.Rendering.Wb 2026-05-21 16:37:55 +02:00
RenderStateCache.cs chore(O-T7): code-review housekeeping after WB extraction 2026-05-21 17:29:06 +02:00
SceneData.cs feat(O-T3): extract GL infrastructure to AcDream.App 2026-05-21 16:00:31 +02:00
TextureAtlasManager.cs feat(O-T4): extract ObjectMeshManager + mesh pipeline closure into AcDream.App.Rendering.Wb 2026-05-21 16:37:55 +02:00
TextureFormatExtensions.cs feat(O-T3): extract GL infrastructure to AcDream.App 2026-05-21 16:00:31 +02:00
TextureParameters.cs feat(O-T3): extract GL infrastructure to AcDream.App 2026-05-21 16:00:31 +02:00
WbDrawDispatcher.cs feat(render): Phase A8 — indoor visibility + streaming fixes batch 2026-05-29 10:14:50 +02:00
WbFrustum.cs feat(render): Phase A8 Wave 1 — WB scaffolding extraction + stencil low-level method 2026-05-27 14:46:07 +02:00
WbMeshAdapter.cs feat(render): Phase A8 Wave 3 — wire EnvCellRenderer into landblock streaming 2026-05-27 15:03:17 +02:00
WbRenderPass.cs feat(render): Phase A8 Wave 1 — WB scaffolding extraction + stencil low-level method 2026-05-27 14:46:07 +02:00