Horizontal Interpolation to correct PAR after integer scale?

Something I had been wondering recently and didn’t know if there was a way to do so, was being able to integer scale to the nearest square pixel value (4x4 for example) but then use a shader to stretch the content to the desired width to match the non square pixel aspect ratio properly without any scaling artifacts? I suppose the same question could also be posed for filling the screen height without scaling artifacts and straight up upscaling from 240p to whatever resolution your display is in one blurry step. (And also make it so games that use multiple modes scale cleanly without issue so the game can switch between 320/256 modes without issue)

Are there shaders i’ve never noticed that can do this?

Another way of wording it would be like the interpolation options on something like the RetroAVS which introduced horizontal interpolation in an update where you can stretch the image horizontally to whatever value you want and it will engage interpolation after it has already been integer scaled up by 3x before hand. So basically…

  1. Integer scale to closest to resolution factor 2.Use interpolation to stretch to desired width/height thereafter to avoid scaling artifacts.

Yeah, there’s a whole directory full of them. It’s the “interpolation” dir. :slight_smile:

Sharp-bilinear does exactly what you’re describing but there are a variety of other options/strategies, as well.

2 Likes

So if I set up integer scaling and IE 4x scale at 1080p if I use one of those shaders would it automatically then scale it to fit the full screen or would I need to turn off integer scaling first?

Turn off integer scaling first.

RetroArch scaling works like this: integer scaling determines how the y axis is scaled and then the x axis is stretched to match the aspect ratio setting.

So, if you want it to fill your entire screen, you would turn off integer (so it stretches to fit vertically) and then set your aspect ratio to match the AR of your monitor.