This was generated by AI during triage.
Parent
#116 — PRD: Deepen game_render interface for GPU-ready world-space rendering
Status
This is now a non-blocking follow-up cleanup/deepening task, not a blocker for completing #116.
The original issue assumed that facing_ok was the last consumer of the DrawTrack3 screen-space projection pass. That is no longer accurate: DrawTrack3 still uses projected TrackScreenXYZ / GroundScreenXYZ data for clipping and render-depth bookkeeping, and func3.c still has repo-wide consumers of TrackScreenXYZ.
What to build
Port the five DrawTrack3 ground backface-culling call sites from legacy projected/view-space facing_ok(...) inputs to a world/camera-space helper such as facing_ok_world(...).
The helper should compute the same front/back-facing decision from world-space vertices, using the current camera position to make the determinant equivalent to the legacy camera-relative projected coordinates.
Acceptance criteria
Explicitly out of scope
Follow-up candidate
After #116 is complete, a later cleanup can replace DrawTrack3’s projected-depth and clip-count bookkeeping with explicit camera-space/world-space helpers, then remove the remaining DrawTrack3 projection pass if no longer needed.
Parent
#116 — PRD: Deepen game_render interface for GPU-ready world-space rendering
Status
This is now a non-blocking follow-up cleanup/deepening task, not a blocker for completing #116.
The original issue assumed that
facing_okwas the last consumer of theDrawTrack3screen-space projection pass. That is no longer accurate:DrawTrack3still uses projectedTrackScreenXYZ/GroundScreenXYZdata for clipping and render-depth bookkeeping, andfunc3.cstill has repo-wide consumers ofTrackScreenXYZ.What to build
Port the five
DrawTrack3ground backface-culling call sites from legacy projected/view-spacefacing_ok(...)inputs to a world/camera-space helper such asfacing_ok_world(...).The helper should compute the same front/back-facing decision from world-space vertices, using the current camera position to make the determinant equivalent to the legacy camera-relative projected coordinates.
Acceptance criteria
DrawTrack3ground culling uses world-space vertices ortVec3/GameRenderVertexinputs for the five currentfacing_okdecisions.facing_ok(...)is either replaced byfacing_ok_world(...)inDrawTrack3or clearly scoped as legacy-only.tests/scene_render_seam_check.pyor equivalent static seam checks that prevent reintroducing projectedTrackScreenXYZ/GroundScreenXYZinputs toDrawTrack3facing decisions.zig buildandzig build test-snapshotspass.Explicitly out of scope
DrawTrack3screen-space projection/depth bookkeeping pass.TrackScreenXYZ[]/GroundScreenXYZ[]globals repo-wide.func3.clegacy screen-space track rendering.Follow-up candidate
After #116 is complete, a later cleanup can replace
DrawTrack3’s projected-depth and clip-count bookkeeping with explicit camera-space/world-space helpers, then remove the remainingDrawTrack3projection pass if no longer needed.