Optimal shaders, AR and visual settings

Which shader do you guys recommend? The CRT shaders I’ve found have too strong scanlines. The best filter I’ve found is SNES9X’s “tv mode” and “blargg’s NTSC (RGB)” filters. Is there anything comparable?

Also, Genesis and PC Engine do not display proper Aspect Ratio. They seem to default to 16:9 even if I set it to 4:3. I set it to 8:7 to get something that is close.

You can use NTSC-RGB with RetroArch via the bsnes *.filter option (at the bottom of the filter/shader window). I have builds of those filters for win32/64, linux 32/64 and mac. Let me know which system you’re on and I’ll post a link for you.

Windows 7 (64 bit).

here you go: http://www.mediafire.com/?62p83g46s95v44r

I absolutely love the Crt shaders. I know they have strong scanlines, but I like them.

I´ve noticed a small imperfection in the crt shaders. When the Screen goes bright white (for example, the PSX BIOS loading, the Neo-Geo Bios), some of the scanlines in the background seem to be thicker . Also noticeable whith other bright backgrounds, especially red.

Do you know if this is a known issue, fixeable via configuration or whatever???, is there an “optimal” resolution for running this shader? i´m running it at 1280x800, the maximum resolution my laptop monitor handles, but i´ve tried it on 37 LCD screen and it also happens there, @ 1080p.

@fogueman That’s caused by non-integer scaling. The CRT shader is less affected by it than most scanline filters, but they all do it. The only way to avoid it is to use only exact-integer scaling, which is easy in windowed mode but harder in fullscreen.

You can use the 2-pass FBO with the CRT shader in conjunction with an integer scaling shader, like this one: https://gitorious.org/bsnes/xml-shaders/blobs/master/shaders/OpenGL/v1.1/Integer-Scale.OpenGL.shader

However, this doesn’t play nicely with the multipass shaders, such as the CRT halation variants. If you just can’t live without halation, you can try this one I made that snaps to integer scaling, but IIRC, it snaps to the max integer minus 1, so you end up with a lot of black space :frowning: http://www.mediafire.com/?pnj9t4q6rw95e4x

thanks for your answer, i´ll take a look at this. What value do I have to set at FBO X Y?

I’ve noticed the scanline artifacts as well. Glad to see them mentioned.

My issue with this integer shader is that it doesn’t seem to respect the aspect ratio setting, so NES games, for example, appear too narrow.

It’s understandable, since the definition of integer scaling precludes stretching the image beyond a multiple of 256x224. But I wonder if there might be a happy medium in terms of scanline artifacts if we were to keep the vertical resolution integer-snapped but let the horizontal resolution increase to allow for, for example, proper 4:3 aspect ratios? Or would that look just as (relatively) artifact-y as the aspect ratio-corrected, vertically unconstrained, full-screen scaling that we get with the normal halation/crt shader?

On a general note: Thanks hunterk, I’ve really appreciated your contributions. Your blog posts were what originally turned me on to the possibilities of CRT shaders, and lead me to RetroArch. It’s made me care about emulation again. :slight_smile:

Thanks, jane, I really appreciate the kind words :smiley:

Having integer scaling on the y-axis only should be possible, I would think. I’ll see if it’s something simple enough for me to figure out.

@fogueman FBO x and y should be set to the integer scale factor that fits your resolution, probably 4 for your laptop, though I think 1080p can support up to 5.

You can use NTSC-RGB with RetroArch via the bsnes *.filter option (at the bottom of the filter/shader window). I have builds of those filters for win32/64, linux 32/64 and mac. Let me know which system you’re on and I’ll post a link for you.

I have noticed that the NTSC filters don’t play nice with the genplus, yabause and stella cores.

I know about the NTSC=1 in the Makefile for genplus but then you are stuck with the composite settings.

What makes those core not like these filters? Is there an “easy fix” (RetroArch settings) or is a change in the source code of the filter needed?

Oh weird. I wasn’t aware of this issue. I’ll look into it and see if it’s something minor that can be fixed easily.

Cheers, I look forward to your findings.

Turns out the filters (I’m using the NTSC-family from bsnes v081) work well with Master System games from the same core…

Looking at the genplusgx sources, it seems eke-eke made changes to blargg’s original “md_ntsc”. I wonder if they could be merged into the “snesfilter” sources from v081.

And let me join jane in his thanks. The libsnes/libretro project and all you good folks had me looking into compilation. I have mingw64, mingw32 (with MSYS) and devkitppc set up on separate machines and there’s this indescribable feeling as you watch code compiling =)

Her. My name is kind of a giveaway, no? :rolleyes: At least we’re both hunterk fans.

Hunter, regarding the Y-axis-only integer shader idea, isn’t that exactly what you get in windowed mode when you set Windowed X scale and Windowed Y scale to integers and then force a non-1:1 aspect ratio? And sure enough, that seems to eliminate the scanline artifacts in question, at least in my quick testing. If a scanline/halation/crt/integer shader could reproduce that in fullscreen that’d be swell.

That said, these options strike me as things that should be in RetroArch’s main video settings rather than shaders.

Her. My name is kind of a giveaway, no?

Oh God! I’m so sorry. Not a native speaker here and the first thing that sprung to mind was “Patrick Jane” from The Mentalist. Unforgivable!

Oh, it’s okay. Thank you for apologizing. It’s a pet peeve of mine that most people always assume everyone (and everything, try watching animal videos on YouTube) is male. I call it “male by default” and it annoys me greatly.

i can´t get rid of the imperfection I mentioned. Also the shader you told me must be very demanding, as Retroarch loses 80% performance when I set it on.

Any advice? Jane did you manage to solve it?

@fogueman You can try this version, which has the integer shader integrated into the single-pass flat CRT shader: http://www.mediafire.com/?omm6f8d0udpae2d

The halation version is indeed very demanding (even moreso than the single-pass version), and you won’t likely get full speed on integrated laptop graphics with either of them.

If that’s the kind of system you’re on, you might have better luck with the CRT-Simple shader, which looks almost as nice but runs much faster (put the integer shader in the second pass): http://gitorious.org/bsnes/xml-shaders/blobs/master/shaders/OpenGL/v1.0/CRT-simple.shader

One other thing to mention: the curved CRT shaders will always have scanline distortion, even with integer scaling, because the curvature messes things up.

@jane It doesn’t help that the emulation scene is a bit of a boy’s club. The only female author I know of is Rypheca (of Mednafen fame). Thankfully, she’s a total badass and does a fine job of representing women in the scene.

Integer scaling is possible, yes. The reason I’d prefer shaders to handle this is because as already noted here, there are too many options for integer scaling. From the top of my head, I can list some of the many options:

  • Maximum integer scale, X and Y independent to fit screen (say, 5x X, 4x Y).
  • Maximum integer scale, X and Y together (1:1 PAR).
  • Maximum integer scale, Y, aspect corrected for X.
  • Manual integer scale for X, Y (w/ w/o aspect correct).

How to account for internal sudden resolution changes? (SNES …)

… It just continues, which is why to avoid lots of complexity in graphics drivers, I prefer to move this to vertex shader.

On the topic of shaders and seeing how RetroArch now supports quite a lot of portable systems (GB/GBC/GBA/GG/PCE-GT) does anyone know of a “crummy LCD” shader? Or at least any chance for a motion blur setting ala Mednafen?

Sorry if the idea sounds ludicrous, the Dot n’ Bloom shader works nicely enough with these platforms and I’m quite happy with it. Just curious :stuck_out_tongue:

@jane: if it is any consolation, I was mistaken for a lady today at work. Talked on the phone with a client who kept saying “Yes, miss” and was sent a “Dear Madam” email 5 min later. Divine retribution?

hunterk, thank you very much as usual for the information.

I don´t get any noticeable difference with the integrated crt - integer shader

I will take a look at all this in my other system, a desktop with more horsepower, and report.

Anyway, the scanline distorsion is a rarely noticeable problem. I just reported this to know if anyone else was getting it or I was doing something wrong.

EDIT: I tried the simple crt plus integer scale. FBO 4, and no scanline distorsion here, and it seems to run full sped the psx core.

Does Retroarch have a show fps key?