acdream/src/AcDream.App/Rendering/Shaders
Erik ce2edad66a feat(render): Phase W Stage 4 — sky/weather portal-clip seal (LScape through the doorway)
The sky + weather (rain cylinder) are retail's LScape — 'the outside seen through the exit portal.' Retail PView::DrawCells (pseudo_c:432709) draws LScape clipped to the OutsideView when outside_view.view_count>0, then does a conditional Z-buffer-ONLY clear (432731) before the indoor cells. acdream now does the same:

- sky.vert writes gl_ClipDistance against the SAME binding=2 TerrainClip UBO the terrain reads. The OutsideView planes are screen-space (NDC) half-spaces encoded as clip-space planes (nx,ny,0,dw); the test dot(plane,gl_Position)>=0 reduces after perspective divide to nx*ndcX+ny*ndcY+dw>=0 — projection-INDEPENDENT — so the same plane set clips the sky EXACTLY despite its separate dome projection. count==0 (outdoor) → all distances +1 → full-screen, bit-identical. Lighting/fog math untouched.

- GameWindow: relocated the sky pre-scene + weather post-scene draws to their retail LScape positions, each in a local 8-plane clip bracket so sky.vert confines them to the doorway indoors / full-screen outdoors. Added the conditional doorway depth-ONLY Z-clear (no color → no blue hole), scissored to the OutsideView AABB. drawSkyThisFrame = seen_outside policy AND (outdoor OR exit-portal-in-view) — a sealed interior with no exit portal in view draws no sky (kills the full-screen-sky interim regression). Sky pre/post particle passes (particle.vert has no gl_ClipDistance) scissored to the doorway bbox.

- ClipFrameAssembly gains HasOutsideView + OutsideViewNdcAabb (the doorway NDC AABB, computed for BOTH Planes and Scissor terrain modes — unlike TerrainScissorNdcAabb which is Scissor-only).

- The pre-login goto SkipWorldGeometry moved BELOW the sky draw so the live sky still renders during the EnterWorld handshake (clipAssembly is null/no-clip pre-login → full-screen).

Build green; App tests 160/160. Stage 4 tests + verify-annotations follow.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-02 16:15:08 +02:00
..
debug_line.frag feat(ui): debug overlay + refined input controls 2026-04-17 18:45:38 +02:00
debug_line.vert feat(ui): debug overlay + refined input controls 2026-04-17 18:45:38 +02:00
mesh.frag fix(render): shader reserved-word + defensive SkyRenderer dat reads 2026-04-19 11:00:34 +02:00
mesh.vert feat(render): Phase G.1/G.2 — SceneLighting UBO + sky renderer + shader integration 2026-04-19 10:39:48 +02:00
mesh_modern.frag fix(render): close #52 — lifestone visible (alpha-test + cull + uDrawIDOffset) 2026-05-10 15:49:05 +02:00
mesh_modern.vert feat(render): Phase U.3 — GPU clip-plane gate (gl_ClipDistance), no-clip default 2026-05-30 17:27:30 +02:00
particle.frag feat(vfx): Phase C.1 — PES particle renderer + post-review fixes 2026-04-28 22:47:11 +02:00
particle.vert feat(vfx): Phase C.1 — PES particle renderer + post-review fixes 2026-04-28 22:47:11 +02:00
sky.frag feat(vfx): Phase C.1 — PES particle renderer + post-review fixes 2026-04-28 22:47:11 +02:00
sky.vert feat(render): Phase W Stage 4 — sky/weather portal-clip seal (LScape through the doorway) 2026-06-02 16:15:08 +02:00
terrain_modern.frag fix(N.5b): black terrain — switch to uvec2 handle + sampler constructor 2026-05-09 12:53:21 +02:00
terrain_modern.vert feat(render): Phase U.3 — GPU clip-plane gate (gl_ClipDistance), no-clip default 2026-05-30 17:27:30 +02:00
ui_text.frag feat(ui): debug overlay + refined input controls 2026-04-17 18:45:38 +02:00
ui_text.vert feat(ui): debug overlay + refined input controls 2026-04-17 18:45:38 +02:00
wb_particle.frag feat(O-T4): extract ObjectMeshManager + mesh pipeline closure into AcDream.App.Rendering.Wb 2026-05-21 16:37:55 +02:00
wb_particle.vert feat(O-T4): extract ObjectMeshManager + mesh pipeline closure into AcDream.App.Rendering.Wb 2026-05-21 16:37:55 +02:00