피드로 돌아가기
Dev.toFrontend
원문 읽기
Measured scanline profile을 gameplay rail에 연결하여 TD2 SDL 포트의 시각적 깊이를 복원함
Restoring gameplay scanline depth in the TD2 SDL port
AI 요약
Context
TD2 SDL 포트에서 gameplay rail gameplay_live_race_mid가 flat end-of-frame ppu_state에서 렌더링되어 도로가 어깨와 지평선을 삼키는 시각적 버그가 발생함. SNES-mimetic 포트에 충실하지 못한 상태였음.
Technical Solution
- Scanline profile: tools/out/lane3_live_race_mid_scanline_full/td2_scanline_step_test.json에서 measured visible-scanline profile 추출함
- Rail attachment: gameplay seed를 전역 프레젠테이션 상태로 취급하던 방식을 중단하고 scanline profile을 직접 rail에 연결함
- Native SDL renderer: bg1_hscroll/bg1_vscroll, bg2_hscroll/bg2_vscroll, bg3_hscroll/bg3_vscroll 필드를 native renderer에 직접 전달함
- Test coverage: end to end test_scheduler.sh에서 gameplay_live_race_mid의 scanline profile 로드를 검증하며 framebuffer 픽셀 스모크 테스트도 포함함
Impact
Live-race 프레임에서 1차원 깊이 단서가 복원됨. 지평선이 돌아오고, BG3는 측정된 스트립에서만 재진입하며, BG2는 하나의 전역 VOFS 대신 실제 per-scanline staircase를 사용함.
Key Takeaway
새로운 gameplay heuristic을 발명하지 않고 기존에 보유한 trace를 더 충실하게 소비하는 방식으로 시각적 품질을 개선할 수 있었음. Scheduler rail은 그대로 유지되면서 개선이 이루어짐.
실천 포인트
게임 포트 프로젝트에서 flat rendering 상태로 인한 시각적 깊이 손실 시 measured scanline profile을 rail/엔티티에 직접 연결하고 native renderer 필드에 전달하는 방식을 적용할 수 있음. 기존 trace 데이터를 재활용하면 새로운 heuristic 개발 없이 렌더링 충실도를 높일 수 있음.