mirror of
https://github.com/RetroPortingToolKit/psxrecomp
synced 2026-10-26 02:11:36 -04:00
b0a89e4ede
Each in-between frame warps the newer real frame's finished image by the in-between camera instead of drawing the scene again: - per game frame: a snapshot of the list's finished image (taken when the list closes; R4 flips to a buffer before drawing into it, so the live surface is not a stable source) and a 2x native image of camera 1/z, pixel kind and view rasterized from the recorded triangles in painter order (world / car-or-dome / 2D-HUD-small-view); - per in-between frame: one grid draw (a vertex per native pixel) that unprojects world pixels with their depth, moves them by the view's in-between camera (fg_view_affine) and samples the snapshot at full resolution, nearest wins; cells over depth edges or non-world pixels are left to the snapshot underneath; 2D/HUD pixels are put back; cars are drawn again at their own in-between position. Measured: ~0.3-0.8 ms CPU and ~0.3-2 ms GPU per in-between frame (was 2-4 ms each), A/G/B max out-of-range 0.3-3 %, worst ratio 1.1-1.5. [video] frame_generation_redraw / PSX_FRAME_GEN_REDRAW=1 keeps the old path. Planner/holds: dynres 'over budget' no longer stops cheap reprojected frames; guest-late trips ignored while they are cheap; allocation and shader compilation are kept out of the cost estimate. frame_gen JSON: rp_ms, rp_zn, reprojected, np (why a flip planned none); debug buffer 4 KiB. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>