CRT-Royale!

I saw this shader get uploaded to git recently. I assume it’s the really complex CRT shader that a few screens were posted of on NeoGAF, but I get an error trying to use it so I’m not sure. Here’s what it says in my command prompt:

RetroArch: [libretro INFO] :: NstDatabase.xml path: ./System/\NstDatabase.xml
RetroArch [WARN] :: [libretro WARN] :: NstDatabase.xml required to detect region
 and some mappers.
RetroArch: [libretro INFO] :: [Nestopia]: Machine is NTSC.
RetroArch [ERROR] :: CG error: The compile returned an error.
RetroArch [ERROR] :: Fragment:
./Shaders/crt-royale/crt-royale-first-pass-linearize-crt-gamma-bob-fields.cg(148
) : error C1008: undefined variable "tex2D_linearize"
./Shaders/crt-royale/crt-royale-first-pass-linearize-crt-gamma-bob-fields.cg(150
) : error C1008: undefined variable "tex2D_linearize"
./Shaders/crt-royale/crt-royale-first-pass-linearize-crt-gamma-bob-fields.cg(152
) : error C1008: undefined variable "tex2D_linearize"
./Shaders/crt-royale/crt-royale-first-pass-linearize-crt-gamma-bob-fields.cg(165
) : error C1008: undefined variable "encode_output"

RetroArch [ERROR] :: Failed to load shaders ...
RetroArch [ERROR] :: [GL]: Failed to init shader, falling back to stock.
RetroArch [ERROR] :: CG error: The compile returned an error.
RetroArch [ERROR] :: Fragment:
./Shaders/crt-royale/crt-royale-first-pass-linearize-crt-gamma-bob-fields.cg(148
) : error C1008: undefined variable "tex2D_linearize"
./Shaders/crt-royale/crt-royale-first-pass-linearize-crt-gamma-bob-fields.cg(150
) : error C1008: undefined variable "tex2D_linearize"
./Shaders/crt-royale/crt-royale-first-pass-linearize-crt-gamma-bob-fields.cg(152
) : error C1008: undefined variable "tex2D_linearize"
./Shaders/crt-royale/crt-royale-first-pass-linearize-crt-gamma-bob-fields.cg(165
) : error C1008: undefined variable "encode_output"

RetroArch [ERROR] :: Failed to load shaders ...
RetroArch [ERROR] :: [GL]: Failed to init shader, falling back to stock.

There are some options in user-settings.h that can be uncommented out that are supposed to fix errors, but none of those match the c1008 error I’m getting. There are two that have tex2d in them, but they are already commented out and uncommenting them doesn’t stop the error.

I’m on Windows using a RetroArch 64bit build from 6/7/14 (I tried a brand new build I compiled myself and that didn’t help). I have a GTX 570 on the 337.88 drivers.

Also, if anyone can get this shader to work, screens would be cool :slight_smile:

Looks like it’s failing on the named passes, which is a pretty new feature. You say an updated build didn’t fix it, though?

Yep, I just did a fresh build from a clean clone to make sure. Same error.

weird… works here! GTX770, Winx64

I figured it out. I was being stubborn and trying to copy the shader piecemeal into my shader folder instead of using the full common-shaders folder. I noticed it needed some blur9 files in the cgp and copied those over too, but I obviously was missing something else. Here’s a shot of Moon Crystal and Zelda with the shader’s default settings and integer scale on as atonement :P:

can you post file?

Looking great. Here is a build that Awakened cooked up including TroggleMonkey CRT-Royale : https://www.dropbox.com/s/lp3xoera2zrpi … -14%5D.zip

(The image resizing here is butchering the crt effect but oh well)

Thank you very much!!

Couldn’t get this to work with openGL?

Damn this shader doesnt run that well on my system…

i7 @4.5Ghz AMD 7979 3GB 16GB Ram Windows 8.1 1440p Resolution

shouldnt this syetm piss all over this shader?

Looks amazing. Does it have screen curvature support ? Thanks for the link.

@John.Merrit Sure does :slight_smile: TroggleMonkey made sure to include pretty much anything you could ever want in a CRT shader.

@BlockABoots It is indeed incredibly slow, but there are a number of things you can do to greatly speed things up. He included a very informative readme that covers some of it: https://github.com/libretro/common-shad … README.TXT

The biggest improvement is probably to find the runtime settings you like, write them down, then open the shader in a text editor and hardcode those values, then comment out the runtime options.

Ah nice, the disabling Runtime shader parameters helps no end, thanks

Question regarding white text, the scanline just seem to disappear on white text, the text just seems to be over saturated, whats the best option to edit to tone this down slighty…

I know this is probably a dumb question, but how do you use this shader? I’ve tried loading the presets but after I select them nothing happens. Am I supposed to set each .cg pass individually? And if so, which ones do I use and which order do I set them up in? There are like 12 different .cg files!

Take the whole shader directory from here and replace yours. This shader calls different other shaders in various folders, so you need the whole identical thing.

Yeah, I downloaded the package from the link in Boulotaur2024’s post and it didn’t work, so I just tried replacing the shader directory and selecting the preset cgp’s still doesn’t do anything for some reason.

Found the curvature in the settings, looks good, not as crisp as my custom one I use from a mix.

CRT royale

CRT custom

@John.Merrit If you go into the shader’s options and get rid of the border darkening or whatever, it should make it sharp-edged like in your custom shot. I don’t recall if it has corner size adjustment, though.

@Chris102 If you’re using an intel GPU, the default setup runs out of registers and fails to load anything, not that it would run anywhere near fullspeed on one anyway. Make sure you have a beefy nvidia/amd GPU and are using the gl (rather than d3d) driver.

Yeah… I am using an Intel HD 4600. I didn’t expect it would run full speed, but I did want to test it out. I guess I’ll have to wait until I get a graphics card.

Thank you!

At an usual distance from the screen, this shader makes me think of an old inkjet color print more than a CRT screen. Guess I fell into the “subpixels emulation never look great on a modern screen” camp.

More visible scanlines and no grain isn’t what it is aimed at probably.