mirror of
https://github.com/RetroPortingToolKit/psxrecomp
synced 2026-10-28 19:07:47 -04:00
c8a1734b81
24-bit FMV was pinned to nearest, so a 320x192 movie was point-sampled up to the whole window: hard pixel edges, and at a non-integer scale the source pixels land unevenly (some 3 window pixels wide, their neighbours 4). The reason for the pin was that plain GL_LINEAR fringed the right edge of low-res 24-bit scanouts into adjacent texels — but gl_renderer_present has since grown a half-texel UV inset and a content_w crop for the depth24 margin, which is that bleed. Reading back the drawable confirms it: the right-edge jump is 0.00 with filtering on. So FMV now follows the video AA setting like everything else, and the present shader reconstructs the source rather than smearing it. PSX_FMV_FILTER picks how, since this is a taste call on a blocky source: nearest previous behaviour (also what video AA = off gives) bilinear plain GL_LINEAR sharp sharp-bilinear, ramp confined to a one-output-pixel band bicubic Catmull-Rom (default) Measured on the intro at 1280x960 — fraction of adjacent pixel pairs differing by >=24 luma (visible staircase) vs mean |dx| (overall sharpness): nearest 1.00% 1.028 sharp 0.87% 1.008 bicubic 0.34% 1.038 bilinear 0.14% 0.930 Bicubic is the default because it removes two thirds of the staircase while holding gradient at the nearest level; bilinear removes the most but costs 10% of it, which reads as blur. s_present_prog is shared with both VRAM/FBO quad paths and program uniforms persist, so every user now states its mode explicitly; the rasterized paths pass 0 (they render at internal scale and have no low-res source to reconstruct) and are byte-identical to before. No FMV cost (56.3 vs 55.4 fps) and no in-race change (57.0/57.6 vs 56.6/56.4). Also extends the present dump with PSX_PRESENT_DUMP_OUT=1, which reads the drawn result back off the drawable — the source-side dump cannot show what a present filter did, and this is what produced the numbers above. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>