Spline36 appears to shift the output
|
05-21-2022, 04:06 AM
Post: #1
|
|||
|
|||
Spline36 appears to shift the output
It looks to me like the built-in Spline36 shader (used for screen upscaling) shifts the ouput by (source-space) half-pixel (i.e. half-pixel in 480x272, assuming 1x internal resolution) towards the upper-left.
That's the behavior I observe in my PPSSPP 1.10.3, but I don't think the shader in question substantionally changed since then. This can be easily seen just be enabling it, since the image instantly jitters slightly. The bilinear upscaling (which is not shader-based, I think) does not have this behavior. As far as I can tell the fix is to change the line Code: vec2 inputPos = outputPos / u_texelDelta; Code: vec2 inputPos = outputPos / u_texelDelta - HALF_PIXEL; As an aside, I am surprised that PPSSPP does not seem to have a bicubic (e.g. Catmull-Rom) option for screen upscaling out-of-the-box, only bilinear and Spline36 (as well as fancy things like 5xBR), even though there is a bicubic texture upscaling option. The Spline36 may, in fact, incur a noticeable slowdown on a reasonably ancient machine (well, probably anything with a weak GPU). E.g. my straightforward implementation of bicubic upscaling shader does not seem to reduce the FPS on my machine, but Spline36 does. I can post my Catmull-Rom shader, if anyone is interested. |
|||
07-03-2022, 08:06 AM
Post: #2
|
|||
|
|||
RE: Spline36 appears to shift the output
I suppose, I should post the follow-up: https://github.com/hrydgard/ppsspp/issues/15566 .
Comments are welcome. Having both bucubic shaders does feel a bit like cluttering the interface. Does anyone actually prefer Mitchell-Netravali over Catmull-Rom? For that matter, does anyone prefer Catmull-Rom over Spline36? As Spline36 is heavier, it is expected to be higher quality, but who knows (percieved quality is somewhat subjective, anyway)? For one thing Catmull-Rom makes 1:1 scaling an identity transform (not that it is a typical usecase), but Spline36, AFAICT, does not (and neither does Mitchell-Netravali). |
|||
« Next Oldest | Next Newest »
|