Few issues with CRT Interlaced Halation shader and RetroArch

Hello,

I discovered how great RetroArch can make older games look by using shaders some time ago, but just recently acquired the hardware to actually try them out. I was especially impressed by CRT Interlaced Halation, but I always see people mentioning other CRT shaders. I was wondering, Is there a better or more accurate CRT shader alternative that I should be using instead these days?

Anyway, I am having a few issues with the shader, although some of these issues may not be related to the shader but the emulator cores themselves. My first issue is that certain games appear to have a “jitter” or “stuttering” effect with the shader enabled. So far it’s been most noticeable on games such as Tekken 3 and during the intro video on Tomba. It is also very prominent on the PS1 startup screen. I am no expert, but I think it might be an interlacing/deinterlacing issue. This doesn’t seem to happen when the shader is disabled, so I’m pretty sure the shader is the problem here.

Do shaders utilize the GPU or the CPU more? I’ve noticed if I set Vsync on in some games my FPS drops to 30. This only seems to happen in emulation of certain platforms such as the PS1 and ScummVM. I am not sure, but I think it might possibly be my weak integrated GPU (Intel HD 4600) that is causing this problem.

Another problem I am having is that I can’t seem to load games in DosBox through RetroArch. When I try to type the commands to run a game, it ignores DosBox and uses the Hotkeys that are mapped to RetroArch instead. Certain characters that are necessary for typing file paths such as : and \ will not register in DosBox through RetroArch.

My final problem has to do with transparency in some games. I think this might be related to the emulator cores, but I’m not sure. Certain games have strange transparency issues. This is especially noticeable in the water levels of Super Mario World using the bSNES core. It’s difficult to explain what it looks like, but objects submerged under the water look like they are behind a mesh screen.

Thank you!

  1. currently, cgwg’s CRT shader (crt-geom*) is the most “accurate” but really you should just go for what looks best to you. Hyllian’s CRT shader and aliaspider’s GTU are great alternatives to check out, as are maister’s ‘glow’ shaders.

  2. that judder is intentional. It’s what interlaced video looks like, though iit’s not as obvious on CRTs. You can disable it in cgwg’s shaders by commenting a line in the code (look toward the top of the shader for ‘#define INTERLACED’ and put // in front of it).

  3. Shaders are completely on the GPU. With vsync on, anything that would cause your fps to dip below 60 will drop it to 30 instead. HD4600 should be able to handle pretty much any shader, though. My HD4000 does almost everything at 1080p and I think everything at 720p.

  4. Dunno, I don’t have much experience with DosBox, but I think there’s a way to capture the keyboard…

  5. That is also intentional, and it’s how the games actually looked, though TVs blended the lines to look like transparency. It’s known as ‘pseudo hires transparency.’ Snes9x will blend it internally but bsnes just sends out the raw image. The ‘tvblur’ shader will do essentially the same thing as s9x, though it can make japanese text in certain games like Seiken Densetsu 3 and Marvelous become blurry. GTU and maister’s NTSC shader will blend it more naturally.

Ah, I see. I disabled the interlacing and the jutter does indeed disappear, but for some reason my scanlines seem too big now. Any idea what’s up with that?

Thanks for the suggestions on the shaders. I’m definitely going to check out the other CRT shaders to see which one is the best for me. I tried the CRT Geom flat shader included with RetroArch just now but I must be doing something wrong because it looks really bad. What scaling should it be set at and should it be set to Linear or Nearest? I had it set to 1 pass, Nearest, 2x/3x and it looked strange to me.

I turned the FPS check on and it seems like I get a constant 60.1/60.2 fps without Vsync and I get screen tearing. However, the second I turn Vsync on my FPS instantly tanks to 30. In SNES/PC Engine I can run Vsync without this happening, so I’m really not too sure what the problem is other than maybe my GPU comes up just short of being able to handle a constant 60fps at 1080p with the shader active in more intense games. If this is the case, I’m not too concerned since I plan to replace the GPU anyway.

Thanks a bunch for the help!

What’s happening is that it’s showing both sets of fields at the same time, so the scanlines look big in comparison to the woven fields. You can try putting one of the deinterlacing shaders from the ‘misc’ directory in as a first pass with the interlacing-disabled crt shader as a second pass. Dunno if that will help or not.

Set the scaling to “don’t care” and it will use the shader to scale all the way up to your game’s resolution. If you set a scale factor, it will use bilinear/NN to scale the rest of the way, which makes some shaders look weird. Shaders that are intended for a specific scale factor, though–like hq2x–should be used that way.

Is that only when you have a shader enabled that you get the framerate drop? If so, then yeah, it’s your GPU struggling with the shader. If it happens without any shaders, it’s your CPU struggling with the core.

I checked without any shader and with Maister’s new “Glow” shader (great shader btw) and both work perfectly with Vsync, so it must just be that the CRT Interlaced Halation is more demanding on the GPU. I doubt it’s my CPU since I have a 4670k, although I haven’t OC’d it yet.

I noticed when using Maister’s Glow shader with ScummVM that I get 141 fps and a lot of screen tearing, even with Vsync set to on in the RetroArch settings. Does Vsync not work with the ScummVM core? I think I remember having this problem with ScummVM outside of RetroArch too.

Another thing I noticed when using some CRT shaders such as Maister’s “Glow” is that on bright backgrounds, especially white, you can notice banding in the scanlines. This doesn’t happen if Integer Scaling is set to on but then the image doesn’t fill my whole screen. I don’t think this happened with CRT Interlaced Halation but I could be wrong. I’ve attached a screenshot to show what I mean. Is there some settings I can use that will fix this?

Thanks again.

Interlaced off is bugged in crt-interlaced-halation-pass2.cg

It needs a workaround similar to crt-geom-curved.cg in this commit.

Oh, and this one too!

Alright, I applied those changes to the halated pass2.

The uneven scanline thing is unavoidable. cgwg’s shaders have a feature called ‘oversampling’ that makes it less visible, but pretty much everything else has them. I recommend using integer scaling with some sort of overlay border if the black margins bother you.

Thanks. The issue is still there in crt-geom-flat.cg if you feel like fixing that too. :slight_smile:

About crt-geom-flat-sharpness.cg I noticed the sharpness switch is braking interlation. Just tried Interlantion ON + Sharper in Tobal 2 and you can see the “artefacts” during movements. The code is slightly different than the other shaders we fixed, not sure what to do in this case.

You could enable integer scaling, set the aspect ratio to 1:1 par, and then go to custom res and move the hor and ver multiplier up by 1 to fill the screen, for example if it was 4x4 change it to 5x5

A Gaffer made a CRT shader that works well with integer off at 1080 (I changed the horizontal sharpness to 1.0 to get it as sharp as possible):

Unfortunately it’s not as bright as the glow shaders.

@Awakened Nice. It looks good overall and the non-integer issues are minimal. Runs quite fast, too :slight_smile:

It looks good, but I have to admit that I miss glow/halation. Forgive me as I don’t know much about the technicalities of writing shaders, but would it be possible to use that technique to either fix the issues with scanlines and scaling with existing shaders such as Maister’s Glow or to add Glow/Halation/other features to this shader?

This can be probably the reason of my recent issues as stated on this thread. Heavy screen tearing… or probably not, since I get it on another set of emulators, it might be with adding RetroArch and others to nvidia control panel and set it to energy saving -> max performance always.

About correct scaling, I recommend using always integer scaling, it almost should be a must. Problem is that with HDReady TV with integer ON you might end with a very small window since there are not enough resolutions to hold an integer 4:3 aspect ratio that isn’t small. With FullHD 1080p this shouldn’t be an issue I guess.