crt-pi shader users - reduce scaling artifacts with these configs in lr-mame2003, lr-fbalpha, lr-nestopia (and more to come)
-
one issue with the excellent crt-pi shader is that it's shadow mask is always vertical, which causes a rainbow effect in vertical games. here's an example:
fortunately, @davej created a 'vertical' variant which has a horizontal shadow mask, which fixes the issue:
the difference is more obvious at full-screen, but here's it zoomed in:
crt-pi.glslp:
crt-pi-vertical.glslp:
this still isn't perfect. the scanlines aren't consistent. this can be fixed by using
video_scale_integer = true
, which forces the game to be in multiples of the original resolution, but on most screens this leaves an additional black border on the top and bottom, where it doesn't divide in exactly.by using integer scaling on only the x axis, we can make a big improvement but still not add new borders. eg:
previous with crt-pi-vertical.glslp:
now:
What about horizontal games?
this same logic has been extended to regular horizontal games/consoles also, but not so obvious.
How to:
to implement this across all games for a system, you would normally have to manually create a new cfg override file for EACH game, and point it to the correct vertical/standard shader, and manually calculate the right resolution. i have saved you the effort :) just extract the following files into the following directories:
1080p screen users
- extract crt-pi_mame2003_configs_1920x1080.zip into
/opt/retropie/configs/all/retroarch/config/MAME 2003/
- extract crt-pi_fbalpha_configs_1920x1080.zip into
/opt/retropie/configs/all/retroarch/config/FB Alpha/
- extract crt-pi_consoles_configs_1920x1080.zip and place each file into the directory specified within the .cfg itself.
720p screen users
- extract crt-pi_mame2003_configs_1280x720.zip into
/opt/retropie/configs/all/retroarch/config/MAME 2003/
- extract crt-pi_fbalpha_configs_1280x720.zip into
/opt/retropie/configs/all/retroarch/config/FB Alpha/
- extract crt-pi_consoles_configs_1280x720.zip and place each file into the directory specified within the .cfg itself.
1280x1024 screen users
- extract crt-pi_mame2003_configs_1280x1024.zip into
/opt/retropie/configs/all/retroarch/config/MAME 2003/
- extract crt-pi_fbalpha_configs_1280x1024.zip into
/opt/retropie/configs/all/retroarch/config/FB Alpha/
- extract crt-pi_consoles_configs_1280x1024.zip and place each file into the directory specified within the .cfg itself.
1366x768 screen users
- extract crt-pi_mame2003_configs_1366x7684.zip into
/opt/retropie/configs/all/retroarch/config/MAME 2003/
- extract crt-pi_fbalpha_configs_1366x768.zip into
/opt/retropie/configs/all/retroarch/config/FB Alpha/
- extract crt-pi_consoles_configs_1366x768.zip and place each file into the directory specified within the .cfg itself.
Curvature version:
If you want the curved CRT 'barrel' version instead, use the following. Note, this shader does not align with the pixels in the same way so the cfgs simply specify the vertical version or not:- extract crt-pi-curvature_mame2003_configs.zip into
/opt/retropie/configs/all/retroarch/config/MAME 2003/
- extract crt-pi-curvature_fbalpha_configs.zip into
/opt/retropie/configs/all/retroarch/config/FB Alpha/
if you have a different screen resolution, please either ask me to create you a new zip, or run the script yourself: https://github.com/dankcushions/crt-pi-configs (instructions in the script itself)
you can check it worked by loading a vertical game (eg, donpachi), accessing the RGUI via select+X or F1, quick menu > shaders > it should be using crt-pi-vertical.glslp, not crt-pi.glslp.
Requirements
This requires Retropie 4.x. Users running a recent image should have no problems. Users with older images: If you update the setup script, and Retropie-Setup > Manage Packages > Core > Retroarch > Update binary. If it still doesn't work after this, edit/opt/retropie/configs/all/retroarch.cfg/
and search forauto_overrides_enable
and ensure it is set toauto_overrides_enable="true"
.For the lr-nestopia configs, you must set the lr-nestopia emulator as your default NES emulator. lr-fceumm (the default) causes lag with the shader, even for an overclocked pi3.
Want to adjust the shader further?
see this post by @davejSpecial thanks:
@davej who created the crt-pi shader.
@UDb23 who created the resolution_db that my script uses to figure out the right scaling. - extract crt-pi_mame2003_configs_1920x1080.zip into
-
nice one!
-
Nice Dank! I was hoping one day to work up the courage to go through all the games I play to set the vertical shader. This will be a great addition to my standard build instructions. Very nice indeed! :)
-
Since I have a small number of vertical games, is there I way I can use RGUI to set the vertical shader per ROM? I been going a bit crazy getting it to work this way. I try to set vertical shader for Donkey Kong, then go to Mortal Kombat to find it also uses vertical (messing up the colors), so I switch that back to regular CRT.pi and it carries to everything else again. I set "per-game" options in RGUI but its not working.
-
@GreenHawk84 said in crt-pi shader users - automatic usage of crt-pi-vertical in vertical games in lr-mame2003:
Since I have a small number of vertical games, is there I way I can use RGUI to set the vertical shader per ROM? I been going a bit crazy getting it to work this way. I try to set vertical shader for Donkey Kong, then go to Mortal Kombat to find it also uses vertical (messing up the colors), so I switch that back to regular CRT.pi and it carries to everything else again. I set "per-game" options in RGUI but its not working.
you need to use the 'save game override' option. alternatively just use the files i made :)
-
I am super anxious if someone can create similar files for FBA!!
Good job!
-
@Pyjamarama These files arent specific to mame-2003. As long as its a libretro core (marked with lr in the name) they will work if you drop them in the right folder. 2 examples are given above so that the relevant core processes them.
Or you could even add .zip to the filename, i.e 1942.zip.cfg and drop them directly into your roms directory.
-
Thank you. I just do not know if the MAME rom namings are the same with FBA rom namings
-
@dankcushions, thanks. So as a side note I went into "settings" - "configuration" - and changed "save on exit" to "on" and "use per game core options" to "on" but now they are permanently changed. I try to "save new config" but nothing holds. "Save current config" doesn't appear to do anything when I press.
-
@GreenHawk84 said in crt-pi shader users - automatic usage of crt-pi-vertical in vertical games in lr-mame2003:
@dankcushions, thanks. So as a side note I went into "settings" - "configuration" - and changed "save on exit" to "on" and "use per game core options" to "on" but now they are permanently changed. I try to "save new config" but nothing holds. "Save current config" doesn't appear to do anything when I press.
none of that is what i told you to do :)
-
I been toying with the idea of building a vertical cab today ......have all the wood etc monitor in front of me right this second ... As I only have a pi zero atm i not sure I can justify all that effort for a few games....could you give me an idea of how many games your list came up with?
As I could be finished by tomorrow if I get cracking now :) many thanks
-
@twd said in crt-pi shader users - automatic usage of crt-pi-vertical in vertical games in lr-mame2003:
I been toying with the idea of building a vertical cab today ......have all the wood etc monitor in front of me right this second ... As I only have a pi zero atm i not sure I can justify all that effort for a few games....could you give me an idea of how many games your list came up with?
As I could be finished by tomorrow if I get cracking now :) many thanks
all that effort? you literally have to copy and paste the cfgs i uploaded. would take 2 seconds. that's the point :)
if you open the zip you can see the total number of files/games. ~1500
-
@dankcushions that's not what I said I was doing :) lol .... If I send them cfgs to my power tools and wood will it build my cab for me ? Just wondered what the game count was when you run your vertical games list . So is that 1500 vertical games or all the games supported regardless of screen rotation? Thanks
-
@dankcushions lol I know
-
@twd
I can't answer your "how many vertical games" question but it's worth pointing out that if you have vertical screen you need to use the opposite versions of the shaders. So the normal shader with vertical games and the vertical shader with horizontal games.@dankcusions
Could you produce a set of files using the opposite shaders for those with vertical screens? -
@dankcushions but can you help me on this side note, how do I get these options back to normal in RGUI?
-
@davej ahh ok thanks bro just going to make it ...if there is 50 games I will be happy
-
i'm going mad :) here's what i said earlier:
if you open the zip you can see the total number of files/games. ~1500
that's ~1500 vertical games in mame2003. if you open up that zip file you'll see ~1500 files. one file for each vertical game.
@GreenHawk84 you're on your own here. i've no idea what you've done to your system. i just wanted to make some cfg override files for vertical games :/
-
@dankcushions thanks buddy ... 1500 is a lot i don't have a pc to hand on a iPad so I cannot download the zip to check so thanks for the info...
-
@dankcushions thats okay, I at least got "per game core" to save as "off" however "save on exit" will not hold if I try to set it off.
Back to your instructions on vertical shader; I went in with WinSCP and to the folders you suggested. However, I did not see a Mame2003 folder as said at the end of your folder path: /opt/retropie/configs/mame-libretro/MAME 2003/
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.