Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

crt-pi shader users - reduce scaling artifacts with these configs in lr-mame2003, lr-fbalpha, lr-nestopia (and more to come)


  • Global Moderator

    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:

    undefined

    fortunately, @davej created a 'vertical' variant which has a horizontal shadow mask, which fixes the issue:

    undefined

    the difference is more obvious at full-screen, but here's it zoomed in:

    crt-pi.glslp:
    0_1473890253505_upload-939ddb58-9c63-4aff-bd31-b5e016b15128

    crt-pi-vertical.glslp:
    0_1473890115436_upload-802cae63-d4a8-4acb-86f6-3fbaa946b219

    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:

    alt text

    previous with crt-pi-vertical.glslp:
    alt text

    now:
    0_1480380617366_upload-3c98dd01-0754-4f08-8548-629ca637c1d0

    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

    720p screen users

    1280x1024 screen users

    1366x768 screen users

    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:

    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 @davej

    Special thanks:
    @davej who created the crt-pi shader.
    @UDb23 who created the resolution_db that my script uses to figure out the right scaling.


  • administrators

    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.


  • Global Moderator

    @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.


  • Global Moderator

    @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 :)


  • Banned

    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


  • Global Moderator

    @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


  • Banned

    @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?


  • Banned

    @davej ahh ok thanks bro just going to make it ...if there is 50 games I will be happy


  • Global Moderator

    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 :/


  • Banned

    @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.