Adapting CRT-Geom-curved.fx for DOSBox to other systems in Retroarch

Admittedly, I’m not a huge fan of CRT-shaders because they look nothing like any CRT I’ve ever owned, which includes high-end Mitsubishi & Sony Trinitron tubes, but absolutely anything is preferable to the bland, blinding razor sharpness of LCD displays when it comes to low-rez retro gaming. Bluring filters help but still make it look like you’re seeing the world through beer goggles. So even though I’ve been using CRT-EasyMode shaders in RetroArch and find them preferable to default settings, I’ve decided my favorite shader so far is something very very subtle - CRT-geom-curved.fx ported over to DosBox. This threadincludes screenshots and discusses the subject. It makes my 1920 X 1080 Samsung LCD monitor on DOSBox look exactly like a premium quality VGA/SVGA CRT monitor of yesteryear (at least to my eyes it does), that is, very faint scan lines with a nice crisp display. I’d like to see this adapted (or at least approximated) to several of the other systems in Retroarch, like Sega Genesis, SNES, NES, and maybe a few others. Question: Is there a way to do this with CRT-geom-curved or any other CRT shader? I’m thinking that DOSbox’s 2X normal scaler is the reason it looks so decent and might not be feasible in RetroArch…

If you do a first pass with stock.cg and set it to 2x scale, it should achieve the same thing. However, crt-geom is going to see it as interlaced, so it’s going to have interlacing jitter. If you want to disable that, you can go into the shader and comment the interlacing detection out.

I wish I weren’t such an idiot with figuring out how shaders work and how to configure them but I don’t even know what doing a first pass is or how to do it, let alone how to set it to 2X scale. Well, I found the stock.cg file at least (/RetroArch\shaders\shaders_cg\stock.cg). That’s a start, I guess. I’m afraid I’m one of those step-by-step guys when it comes to some of these things. I use RocketLauncher as my launcher and I’ve pretty much just been just pointing its FilterShader field to shaders and hoping they work. I’m very 101, alas.

no problem.

1.) go into the shader menu, set the shader passes to 2 2.) for shader #0, pick the stock.cg shader 3.) go down to shader #0 scale and change it to 2.0 4.) for shader #1, pick crt/shaders/crt-geom.cg 5.) scroll up and hit Apply Shader Changes

This doesn’t include any of the interlacing stuff I mentioned earlier but we’ll cross that bridge when we come to it.

Thanks. Followed the guide you posted above and got the flickering the first time. But on several subsequent instances where I ran the same configuration there was no jitter or flickering and the shader looks no different than the default CRT-geom settings with rather thick scan lines. What would be the final step to remove the interlace artifacts and make the scan-lines look really thin like you’d see on a VGA monitor which is the desired effect I’m going for? If this works out I’d like to do the same thing for WINUAE. One more thing: I’s like to try this with the CRT-geom-flat.cg version instead of curved. Would you happen to know where I can get this? Thanks again for your help.

Well, you might want to try something different.

Just add these lines to the bottom of crt-geom.cgp and then ‘load shader preset’ and select your newly modified preset:

parameters = “scanline_weight;cornersize;CURVATURE”

scanline_weight = “0.5” cornersize = “0.0001” CURVATURE = “0.0”

It should be flat and have almost invisible scanlines.

[QUOTE=hunterk;53339]Well, you might want to try something different.

Just add these lines to the bottom of crt-geom.cgp and then ‘load shader preset’ and select your newly modified preset:

parameters = “scanline_weight;cornersize;CURVATURE”

scanline_weight = “0.5” cornersize = “0.0001” CURVATURE = “0.0”

It should be flat and have almost invisible scanlines.[/QUOTE]

I tried this, and while the scanlines are subtle enough to almost simulate an old CRT VGA monitor, the image is quite dark. Is there a setting to adjust this? Thanks for your help.

Oh, whoops, I gave you the wrong value for the cornersize (that’s what makes it so dark, oddly enough). Change that value to 0.001 and it should brighten right up.

It worked! Not quite as subtle and sharp as CRT-geom-curved.fx for DosBox at Normal 2X scaler but a definite improvement over the default heavy scanline settings for the CRT-geom shader, Thanks. It’s a pleasure to have had someone help me with this who really knows his stuff (I’ve read your topics on shaders on your blog). Thanks again :slight_smile:

My pleasure!

You can try sharpening it up by going to the preview parameters and changing the CRTGeom Sharpness value to 2.0 or 3.0. If that’s to your liking, you can hardcode the value into the preset just like the other values we changed:

parameters = “scanline_weight;cornersize;CURVATURE;SHARPER”

scanline_weight = “0.5” cornersize = “0.001” CURVATURE = “0.0” SHARPER = “whatever_value_looked_good_to_you”

[QUOTE=hunterk;53388]My pleasure!

You can try sharpening it up by going to the preview parameters and changing the CRTGeom Sharpness value to 2.0 or 3.0. If that’s to your liking, you can hardcode the value into the preset just like the other values we changed:

parameters = “scanline_weight;cornersize;CURVATURE;SHARPER”

scanline_weight = “0.5” cornersize = “0.001” CURVATURE = “0.0” SHARPER = “whatever_value_looked_good_to_you”[/QUOTE]

Thanks, I’ll try playing around with it. I’m also looking forward to using this particular shader effect with WinUAE, which is also in the CRT-geom.fx format. Just have to figure out how to do it. Since it’s outside the scope of retroarch and this forum, perhaps the boys over at the English Amiga board could help me with that, unless you know of an easy conversion process.

Depending on when their port was made, it may not have the same options as ours, and it probably doesn’t expose them in such a way that they’re easy to manipulate. In that case, you would have to open it in a text editor and find the options (if they’re there at all) and change the values. The only ones I know will be there are cornersize and a commentable curvature toggle.