Raspberry Pi friendly CRT shader

TVs have an annoying habit of doing image processing and messing up carefully prepared shader effects. hunterk’s suggestion of using integer scaling is the best solution.

Thanks for the answers guys, but unfortunatelly turning integer scaling didn’t fix the problem. As Dave said, it’s probably my TV scaling messing with the shader.

For example, this random screenshot from the internet show exactly the problem I’m having right now:

Yeah, that’s what happens with non-integer scaling. If your TV is doing scaling of its own, that can mess things up even if RA is doing it properly.

I tried to use this shader on my OUYA, unfortunately it’s not working. Is there any other crt-shader, thats optimized for weaker devices (Tegra3)

It was my TV all along. I switched the HDMI mode to something called “graphic” and the scaling was gone. Now I have a small black border around everything, but at least the CRT shader (and everything else) is displaying correctly.

Don’t forget to turn integer scaling off. If you still have the borders you might look into the overscan settings in your config.txt file.

What settings do I need to change on a fresh retropie install? I get vertical lines in the image… faint, but they are there :frowning: Tried to take a pic but doesnt show well… . but its showing really well in super mario stage 1 blue background.

So, I might have missed something? Any other settings not mentioned here I need to change from default when using a fresh install retropie 3.8.1

thanks for taking your time and fixing a shader for rp!! :smiley:

[QUOTE=Bytestorm;43000]What settings do I need to change on a fresh retropie install? I get vertical lines in the image… faint, but they are there :frowning: Tried to take a pic but doesnt show well… . but its showing really well in super mario stage 1 blue background. [/QUOTE]

“vertical lines” doesn’t provide enough information to identify what the problem might be so post a pic anyway. Details about your screen would help too.

In the meantime, someone reported a problem with vertical lines that turned out to be their TV’s image processing. If your problem looks like a faint version of that try the solution on that page.

[QUOTE=dave j;43087]“vertical lines” doesn’t provide enough information to identify what the problem might be so post a pic anyway. Details about your screen would help too.

In the meantime, someone reported a problem with vertical lines that turned out to be their TV’s image processing. If your problem looks like a faint version of that try the solution on that page.[/QUOTE]

Hi!

Here are some pictures. I have a Samsung 24" PLS pc monitor.

https://drive.google.com/open?id=0B-rKMZNU3drYYWdwNm9rYWFOcFE https://drive.google.com/open?id=0B-rKMZNU3drYaWlBbm42QjBaeW8

[QUOTE=Bytestorm;43240]Hi!

Here are some pictures. I have a Samsung 24" PLS pc monitor.

https://drive.google.com/open?id=0B-rKMZNU3drYYWdwNm9rYWFOcFE https://drive.google.com/open?id=0B-rKMZNU3drYaWlBbm42QjBaeW8[/QUOTE] What happens if you set the MASK_TYPE to 0 in the crt-pi.glsl file? This will disable the shadow mask emulation and should stop the display’s image processing introducing unwanted effects.

Change the line to

#define MASK_TYPE 0

[QUOTE=dave j;43328]What happens if you set the MASK_TYPE to 0 in the crt-pi.glsl file? This will disable the shadow mask emulation and should stop the display’s image processing introducing unwanted effects.

Change the line to

#define MASK_TYPE 0

[/QUOTE]

Sorry to follow up your tips with another question but, how can I change this value? I cant find any way to open the shader file in retropie :frowning: Do I need to unmount the microSD and put it in a pc or something to reach the shaders?

I tried to start a game and pressing F1, then going to quickmenu wich has a shader area… but there is no such line there… only a few changable ones.

thanks

[QUOTE=Bytestorm;43333]Sorry to follow up your tips with another question but, how can I change this value? I cant find any way to open the shader file in retropie :frowning: Do I need to unmount the microSD and put it in a pc or something to reach the shaders?

I tried to start a game and pressing F1, then going to quickmenu wich has a shader area… but there is no such line there… only a few changable ones.

thanks[/QUOTE] I’m not the best person to give advice on RetroPie as I generally just start retroarch from the command line. If anyone’s more familiar with RetroPie than me please feel free to chip in. :slight_smile:

Exit EmulationStation - from the main screen select MENU->QUIT->QUIT EMULATIONSTATION That will bring up a command prompt. Enter

sudo nano /opt/retropie/emulators/retroarch/shader/shaders/crt-pi.glsl

Look for the line that says

#define MASK_TYPE 1

Change the number to 0. Save the file and exit.

You can restart emulation station by entering

emulationstation

[QUOTE=dave j;43342]I’m not the best person to give advice on RetroPie as I generally just start retroarch from the command line. If anyone’s more familiar with RetroPie than me please feel free to chip in. :slight_smile:

Exit EmulationStation - from the main screen select MENU->QUIT->QUIT EMULATIONSTATION That will bring up a command prompt. Enter

sudo nano /opt/retropie/emulators/retroarch/shader/shaders/crt-pi.glsl

Look for the line that says

#define MASK_TYPE 1

Change the number to 0. Save the file and exit.

You can restart emulation station by entering

emulationstation

[/QUOTE]

The tip worked great for the bars… but now the game lags instead. really laggy scrolling when running right. :(… I have no idea what have happened.

Maybe I need to reinstall full retropie again or something ?

I did scrape all the roms also, but now I dont see the full filenames anymore, only game name. :S sigh

thank you so much for taking your time thou!! I really appreciate it!

Have noticed uneven scanlines on white backgrounds like the Konami logo screen for SNES games, can this effect be fixed at all?

Use integer scaling and put up with the borders around the screen. You’re never going to get perfectly even scanlines without integer scaling regardless of which shader you use. The best you can get is good enough for it to not be noticeable in most circumstances.

It’s worth noting that crt-pi really needs greater than 4x scaling for non-integer scaling to work well (not perfectly).

I have enabled x4 scaling in the shader options, but now im getting a kind of rainbow look to the screen, and the scanlines are even more uneven, any ideas?

Set the shader scale to ‘don’t care’ and set your video settings to ‘integer scale ON’

Together with what hunterk said, take a detailed photo of a screen showing the effect and post a link to it here.

Is there any easy way to “reset” all the config files to default in retropie? I have been mixing and trying, and also had problems with white static noise in the headphones so I have ended up making lots of changes that probably didn’t needed to be done, hence its not working that good for me. Do I need to make a fresh install or can I just reset all to default somehow?

Do you mean take a pic when i have selected x4 scaling for the shaders setting?

Also dave, seeings you have done such an awesome job getting this running on a RPi, and chance of give a handheld shader a go for systems like the Gameboy, Gameboy Advance, Lynx, PSP etc?