this was developed for retropie and the crt-pi shader, but could be used for any retroarch install and shader (although you’d have to edit the files for the latter).
below is a dump of my instructions for retropie users, but hopefully this makes sense still
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 usingvideo_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 into 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 into 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 into 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 into 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 for auto_overrides_enable
and ensure it is set to auto_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 @dave_j
Special thanks: @dave_j who created the crt-pi shader. @UDb23 who created the resolution_db that my script uses to figure out the right scaling.