acdream/src/AcDream.App/Rendering/Wb
Erik d5deeb3314 fix(render): Phase A8 — remove cull-restore at EnvCell exit (lets IndoorPass inherit cull-off)
Visual-gate-#4 evidence revealed the prior commit's cull-restore-at-exit
addition was wrong. The Landblock→None CullMode override worked correctly
for cell-mesh polys, but the cull-back state I restored at Render exit
propagated to the subsequent `dispatcher.Draw(IndoorPass)` call. The
dispatcher's IndoorPass renders AC's cottage shell — landblock-baked
GfxObj parts (wooden floor planks, wall slabs) whose pos-side winding +
our FrontFace=CCW + cull-back = floor poly is back-facing and culled.
User saw light blue sky through the floor in gate-#4.

Reverting the cull-restore lets cull-disabled propagate from
EnvCellRenderer.Render through IndoorPass. Cottage shell renders
double-sided so the floor + wall slabs are visible from any angle.
Step 4's gl.Enable(EnableCap.CullFace) at the terrain pass (line
~10768) + the cleanup block's enable (line ~10870) re-establish
cull-back BEFORE the LiveDynamic dispatcher.Draw fires — so chars,
NPCs, doors still render solid (no see-through-head regression from
gate-#3's ACDREAM_A8_DISABLE_CULL=1 diagnostic).

The retail-faithful long-term fix is matching WB's `glFrontFace(GLEnum.CW)`
globally (per GameScene.cs:843) so cull-back selects the correct side
for AC's natural polygon winding without needing double-sided rendering.
That requires a wider audit of every consumer's FrontFace assumption
(translucent crystal renderer + others) and is deferred.

14/14 EnvCellRenderer tests pass. Build green.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-27 20:24:59 +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 RR3 — Building + BuildingRegistry + BuildingLoader 2026-05-27 11:08:43 +02:00
BuildingLoader.cs Revert "fix(render): Phase A8 RR7.3 — dat-driven BFS in BuildingLoader" 2026-05-27 14:07:13 +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 fix(render): Phase A8 — remove cull-restore at EnvCell exit (lets IndoorPass inherit cull-off) 2026-05-27 20:24:59 +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 refactor(render): extract WbDrawDispatcher.GroupKey to internal type at namespace scope 2026-05-10 17:13:44 +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 phase(N.4) Task 11: LandblockSpawnAdapter (atlas-tier ref-count bridge) 2026-05-08 13:53:38 +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 RR5 — WbDrawDispatcher Draw(cellIds:) overload 2026-05-27 11:18:21 +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