Crt Shaders integer scaling on or off?

Hello Libretro Forums, I have a question regarding Crt Shaders. So when using a CRT shader on a 1080p monitor are you supposed to turn integer scale ON? I came across a few posts about it and i noticed that some people set it ON custom using 6x and 5x. But isn’t this the same as stretching the image?

The image is always stretched (unless you want it to be the size of a postage stamp at 1x scale). The real questions are non-/integer scale and aspect ratio. On 1080p displays, ~240p content scales ~4.5x, which makes scanlines look bad but dropping down to 4x integer leaves you with big black bars everywhere. So, instead, you can bump it up to 5x to get even scanlines, but that could still leave you with uneven pixels on the X-axis if you stretch the screen to the normal 4:3 aspect ratio, and these uneven pixels show up as “shimmering” on backgrounds etc. during horizontal scaling. Or, you could use 1:1 PAR (i.e., square pixels or “pixel perfect” mode), which makes some things look really weird (some people really like this look, though, and if you’re one of them, you do you. Don’t @ me). Luckily, 6x is an even integer and ends up making the image aspect ratio pretty darn close to 4:3, so sprites/characters/icons look more or less how they would have looked on a CRT and with no “shimmering” on either axis.

4 Likes

Wow! I didn’t know that. So even tho it’s full screen it’s not 100 percent stretched? Not sure if i understand lol I been playing games in retroarch all this time 4:3 and using a CRT shader and never really bothered with integer scale because i always thought it would make it look worse. I’m going to test it myself right now setting it CUSTOM 6x and 5x. Imma try this on PS1 but does this work on other systems as well?

It should work on pretty much any of them. It’s my typical default on 1080p displays.

1 Like

Lol I feel so ignorant man. It’s going to be really weird to see the games full screen since i’m so used to black bars on the side lol

There will still be black bars, but they’re a lot smaller.

1 Like

Are you suggesting to use 6x(for the x-axis) and 5x(for the y-axis)?

Yes, that’s correct.

1 Like

I don’t have black bars tho lol my game is legit full screen using 6x (1920 ) and 5x (1120 ). Am i doing anything wrong?

1 Like

I’m not sure myself.

Also side question what should I do about Capcom play system games, as they will upscale to 1080p via integer scaling. How would I make these 4:3?

So i tested Ps1 and GBA. PS1 scales 6x(1920) 5x(1200) it to full screen no black bars while GBA 6x (1440) 5x (800) has black bars. Is this normal? It does look good with CRT shaders both systems.

1 Like

What’s being left out here is that any scaling and amount of black bars depends on the base resolution of the system, overscan, and the desired aspect ratio compared to the display. These are obviously not the same for every emulated system.

The GBA has a resolution of 240x160. It also does not use an 4:3 ratio, but 3:2, which means when aiming for the original screen ratio, you would just scale 1x1 and up with integer scaling. Therefore, on a 1920x1080 screen, that fits at least 6x6 times - 1440x960, leaving a relatively small border at top and bottom and larger at the sides. With 7x7 (1680x1120), you fill more left and right but that will cut of parts of the screen. How important that is, depends on the game.

2 Likes

You could scale them 4x5. That gives you 1536x1120. I tried this yesterday, those games seem to cut off a bit more vital things than Neo Geo though.

1 Like

Ah, the 5x/6x is based on 256x240. If you load up, say, snes9x and set it up there as a global option, it should stay like that for the other systems, as well.

1 Like

I’ll test some things in a few.

So the rule of thumb (inaccurate, lol) here is to increase my x multiple, one higher then the multiple for my y(6x/5x) for maintaining 4:3 while removing shimmering?

@Jamirus Thanks, I’ll test it later today.

EDIT: Got out a calculator and answered some of my own questions so cleaned this up some.

That’s right, 6x5 will work for 256x224 modes with a ratio like NES/SNES. E.g. for Genesis, it would only work for a minority of games, since most use a 320x224 base.

1 Like

I love that ps1 stays basically full screen lol looks real good for 3 d games like ffix. Im using the denoiser crt br shader looks perfect. So for gba what should be the scale? 6x and 5x? Also for Genesis when i scale 6x and 5x i also get full screen no bars using the genesis gx core. Thanks a lot for the help by the way you guys are awesome!!

1 Like

Here ya go!

Tldr; On 1080p use 6x6 (1440x960) minor black bar at top/bottom. Use 7x7 (1680x1120) for cutoff top and bottom graphics.

Lmao i didnt even read that comment lol thanks man!

1 Like

This is what I’ve been doing for years. 6x5 is very close to a 4:3 ratio and takes advantage of the full vertical width of the screen. Whatever gets cropped is outside of the “safe area” for CRTs.

Then I eventually realized I could set the X axis to a custom non-integer value so that it’s an exact 4:3 ratio (for example, 1494 x 1120). Blur/scaling from shaders will completely hide the non-integer scaling artifacts on the x-axis resulting from this, and the scanlines will be perfect.

For the vast majority of games/systems I use either 1494 x 1120 or 1600 x 1200. Cropping 120 pixels off of 1200 still displays the entire CRT safe area. The only time you might run into issues with this is with arcade games, which often ignored the safe area since this was a broadcast/TV thing.

EDIT: It can be somewhat annoying to set this within Retroarch as you then have to reposition the window. It’s easier to just add this line to the core’s config file:

custom_viewport_width = “1494”

2 Likes