RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login

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

    Scheduled Pinned Locked Moved Ideas and Development
    crt-pi shadercrt-picrt-pi-verticalshaderslr-mame2003
    385 Posts 42 Posters 262.1k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • G
      garion @dankcushions
      last edited by

      @dankcushions

      preference order:

      only within a certain tolerance of the original aspect ratio? but maybe harder to code. If a vertical game is only -1% stretched with today script there is a chance we got a +10% only with round up. (I dont know if there is games with range between -1 to -3%

      only for vertical games?

      always round up the x scale in horizontal/vertical games?

      1 Reply Last reply Reply Quote 0
      • I
        iainjh
        last edited by

        this works fabulously on my pi3 and 1280x1024 - thank you very much! :):)

        1 Reply Last reply Reply Quote 1
        • dankcushionsD
          dankcushions Global Moderator @garion
          last edited by

          @garion @caver01
          ok, i made a set of 'wider' configs that prioritise a wider aspect ratio, as long as it's within 25% tolerance from the game's original aspect ratio.

          crt-pi_mame2003_configs_1920x1080.zip
          crt-pi_mame2003_configs_1280x720.zip
          crt-pi_mame2003_configs_1280x1024.zip

          crt-pi_fbalpha_configs_1920x1080.zip
          crt-pi_fbalpha_configs_1280x720.zip
          crt-pi_fbalpha_configs_1280x1024.zip

          25% is the minimum it would have to be to allow widening in @caver01's 'krull' example. i'm not sure how much of a change it makes for other games. maybe the tolerance can be higher. does anyone else have any examples of games that look like they should be wider, using these or my previous configs?

          not tested any of these yet, but will do tonight :)

          G 1 Reply Last reply Reply Quote 2
          • G
            garion @dankcushions
            last edited by

            @dankcushions P-E-R-F-E-C-T

            tested:
            donpachi
            ddopach
            ddpoj
            espalluga
            esprade
            reversos
            progear (horiz)
            sailormoon (horiz)

            great visual improvement in vertical games.

            thanks for your update.

            1 Reply Last reply Reply Quote 0
            • RumblinBuffaloR
              RumblinBuffalo
              last edited by

              @dankcushions

              I'm curious, can the exact same principles used here for the MAME configs, be used for the other 4:3 systems (Genesis etc.) to reduce banding effects? For example, I've seen some of the rainbow/banding effect here and there testing certain Genesis/NES games, with the CRT-PI shader on (default settings - core aspect ratio etc.)

              If I turn on integer scaling, of course these go away and with it my screen shrinks (bars top/bottom). However - if I change my aspect ratio to custom I can adjust the aspect ratio parameters to make it "close" to what it should be (the height of the screen, but slightly wider or narrower, much like MAME).

              I only tested a couple of ROMS. and it seems to work fine for NES, SNES, but for the Genesis/Megadrive I notice the top/bottom of the screen cuts off a few lines.

              I'm still learning, but is it possible that one could edit the retroarch config for a specific system (Genesis for example) and set the integer scale parameters (custom) to eliminate the banding effects? The trade off being that the games play slightly wider, but cleaner?

              caver01C 1 Reply Last reply Reply Quote 0
              • caver01C
                caver01 @RumblinBuffalo
                last edited by

                @RumblinBuffalo yes, that's something you can do. Just edit the cfg file in the respective emulator config folder and the changes will affect that emulator only.

                My 4-player cocktail style cabinet built as a custom "roadcase"

                1 Reply Last reply Reply Quote 0
                • RumblinBuffaloR
                  RumblinBuffalo
                  last edited by

                  @caver01

                  I don't believe this is going to work as I had hoped. Using Sega Genesis as an example, with the integer scaled height being either 1120 or 896, I'm always going to be either slightly taller or slightly shorter than the display. I tried customizing at 1080 height but of course that is not the proper scale, and thus the banding is noticeable (NHL Hockey for example has noticeable banding on the ice as the screen moves up/down).

                  Integer scaling looks great, but again I'm limited to the black bars top/bottom. After re-reading and better understanding some of the above, it looks like I may have taken the long way around the block on this.

                  caver01C dankcushionsD 2 Replies Last reply Reply Quote 0
                  • caver01C
                    caver01 @RumblinBuffalo
                    last edited by

                    @RumblinBuffalo The real benefit was for scaling vertical arcade titles on horizontal displays where you were going to have black borders on the sides anyway. The beauty was you could scale the horizontal dimension of vertical games to an integer magnification to prevent banding artifacts of the shader, then stretch the vertical all the way to the edge of the screen because that dimension carried no banding problems.

                    For your situation, you are trying to use the technique on horizontal games, on what is likely a horizontal display. You probably can't stretch all the way to the edges horizontally, as a wide screen will result in too much distortion. It sounds like you already found the optimal viewport anyway.

                    My 4-player cocktail style cabinet built as a custom "roadcase"

                    1 Reply Last reply Reply Quote 0
                    • dankcushionsD
                      dankcushions Global Moderator @RumblinBuffalo
                      last edited by

                      @RumblinBuffalo said in crt-pi shader users - reduce scaling artifacts in lr-mame2003/lr-fbalpha (horizontal AND vertical games):

                      @caver01

                      I don't believe this is going to work as I had hoped. Using Sega Genesis as an example, with the integer scaled height being either 1120 or 896, I'm always going to be either slightly taller or slightly shorter than the display. I tried customizing at 1080 height but of course that is not the proper scale, and thus the banding is noticeable (NHL Hockey for example has noticeable banding on the ice as the screen moves up/down).

                      Integer scaling looks great, but again I'm limited to the black bars top/bottom. After re-reading and better understanding some of the above, it looks like I may have taken the long way around the block on this.

                      home consoles often accounted for varying overscan capabilities of consumer TVs. that is, you can use a vertical scale that is BIGGER than your screen, and not worry about the bit of image you've cut off at the top and bottom, because it will not have anything crucial to the gameplay. e.g., the score in sonic and super mario bros isn't right at the top of the screen, because some (perhaps most?) TVs might not show that.

                      this is what i do for nes snes and megadrive (along with getting the correct horizontal scale via my algorithm). i'll release my cfgs at some point if anyone cares!

                      caver01C 1 Reply Last reply Reply Quote 0
                      • RumblinBuffaloR
                        RumblinBuffalo
                        last edited by

                        @caver01 said in crt-pi shader users - reduce scaling artifacts in lr-mame2003/lr-fbalpha (horizontal AND vertical games):

                        The real benefit was for scaling vertical arcade titles on horizontal displays where you were going to have black borders on the sides anyway. The beauty was you could scale the horizontal dimension of vertical games to an integer magnification to prevent banding artifacts of the shader, then stretch the vertical all the way to the edge of the screen because that dimension carried no banding problems.

                        @caver01 Agreed and thanks. I'm gaining a much better understanding of this now. It works with vertical arcade games because they have plenty of room (on my wide screen) to be scaled to a usable "integer magnification", which eliminates the banding (which is essentially horizontal banding sideways due to the vertical shader). Trying this with a Genesis or NES game doesn't work because the integer scale height (1120) is taller than my 1080 display - hence the cutoff. How (if at all) do you apply shaders for these systems in your roadcase?

                        @dankcushions said in crt-pi shader users - reduce scaling artifacts in lr-mame2003/lr-fbalpha (horizontal AND vertical games):

                        home consoles often accounted for varying overscan capabilities of consumer TVs. that is, you can use a vertical scale that is BIGGER than your screen, and not worry about the bit of image you've cut off at the top and bottom, because it will not have anything crucial to the gameplay. e.g., the score in sonic and super mario bros isn't right at the top of the screen, because some (perhaps most?) TVs might not show that.

                        @dankcushions Thank you - I think that explains it exactly for me. So some games - Sonic and Mario are perfect examples - look fine if I stretch to the 1120 scale because the scores don't cutoff. However, a few games like Streets of Rage or Revenge of Shinobi that put information in a yellow border right at the top of the screen, are partly hidden above the screen (presumably because the developer didn't take the overscan into account?)

                        this is what i do for nes snes and megadrive (along with getting the correct horizontal scale via my algorithm). i'll release my cfgs at some point if anyone cares!

                        I'd definitely be interested to see your cfgs. So you actually scale your nes/snes/megadrive larger than your screen?

                        1 Reply Last reply Reply Quote 0
                        • caver01C
                          caver01 @dankcushions
                          last edited by caver01

                          @dankcushions said in crt-pi shader users - reduce scaling artifacts in lr-mame2003/lr-fbalpha (horizontal AND vertical games):

                          home consoles often accounted for varying overscan capabilities of consumer TVs. that is, >you can use a vertical scale that is BIGGER than your screen, and not worry about the bit of >image you've cut off at the top and bottom, because it will not have anything crucial to the >gameplay. e.g., the score in sonic and super mario bros isn't right at the top of the screen, >because some (perhaps most?) TVs might not show that.

                          this is what i do for nes snes and megadrive (along with getting the correct horizontal scale via my algorithm). i'll release my cfgs at some point if anyone cares!

                          Are you saying that you setup a viewport for some of the home consoles that exceeds the vertical dimensions of your display? If so, I am very interested in that, or however you are doing it. I guess I must be just living with some shader issues on the home consoles. I do see some odd stuff that was normally offscreen in the good old days, so I am curious about your setup. Perhaps you could share an example, and I can take it from there. I think we are running different display resolutions anyway, but I'd love an example config for say, Atari 2600 or NES if you are willing.

                          My 4-player cocktail style cabinet built as a custom "roadcase"

                          1 Reply Last reply Reply Quote 0
                          • FurlugeF
                            Furluge @dankcushions
                            last edited by

                            @dankcushions Could I by any chance get a version of the 720p configs that use the curvature versions of the shaders?

                            dankcushionsD 1 Reply Last reply Reply Quote 0
                            • dankcushionsD
                              dankcushions Global Moderator @Furluge
                              last edited by

                              @Furluge there's no need for integer scaling on the curved version i think. it doesn't line up the same way

                              FurlugeF 1 Reply Last reply Reply Quote 0
                              • FurlugeF
                                Furluge @dankcushions
                                last edited by

                                @dankcushions Ok, but it is still useful to have the override for all the vertical games.

                                dankcushionsD 1 Reply Last reply Reply Quote 0
                                • dankcushionsD
                                  dankcushions Global Moderator @Furluge
                                  last edited by

                                  @Furluge said in crt-pi shader users - reduce scaling artifacts in lr-mame2003/lr-fbalpha (horizontal AND vertical games):

                                  @dankcushions Ok, but it is still useful to have the override for all the vertical games.

                                  very true! i've done this also now - check the top post :) I've also updated the other links to have the 'tolerance' version also. not tested any of this yet but it looks ok.

                                  FurlugeF 1 Reply Last reply Reply Quote 1
                                  • N
                                    Nataq
                                    last edited by

                                    Hi !

                                    I am very interested in this. My Samsung UN28H4000 has a 1366x768 resolution though. Can you share a version of your work for that specific resolution ? Unless you think its too odd ? There is some part of the conversation, specifically about aspect ratio, I dont fully understand. All I am interested in is to get the proper vertical shader for vertical game and not touch my horizontal games since I am happy with the result.

                                    Thank you for your help !

                                    If it is easy to do, it would be nice to add a few more resolutions to your first post so you get less requests :P

                                    dankcushionsD 1 Reply Last reply Reply Quote 0
                                    • dankcushionsD
                                      dankcushions Global Moderator @Nataq
                                      last edited by

                                      @Nataq said in crt-pi shader users - reduce scaling artifacts in lr-mame2003/lr-fbalpha (horizontal AND vertical games):

                                      Hi !

                                      I am very interested in this. My Samsung UN28H4000 has a 1366x768 resolution though. Can you share a version of your work for that specific resolution ? Unless you think its too odd ?

                                      Done! see original post :)

                                      There is some part of the conversation, specifically about aspect ratio, I dont fully understand. All I am interested in is to get the proper vertical shader for vertical game and not touch my horizontal games since I am happy with the result.

                                      the scripts do change horizontal games, but i think you will either not notice or be happy with what it does. if you only want to do vertical games i can generate that for you, but try first :)

                                      N 1 Reply Last reply Reply Quote 0
                                      • N
                                        Nataq @dankcushions
                                        last edited by

                                        @dankcushions Awesome ! Can't wait to try this out. Thank you :)

                                        1 Reply Last reply Reply Quote 0
                                        • N
                                          Nataq
                                          last edited by

                                          Ok I extracted the file into /opt/retropie/configs/all/retroarch/config/MAME 2003/ and I can see all the files there although the vertical shader isn't loaded in games.

                                          • I still see the horizontal rainbow effect on vertical games
                                          • I am using version 4.1 of retropie
                                          • My Roms are located directly into retropie\roms\mame-libretro
                                          • Even if I add .zip to the cfg file name and drop in roms folder it isn't working
                                          • I can see the message saying override cfg file has been loaded when launching games

                                          Can some part of my config block the shader change somehow ?

                                          dankcushionsD 1 Reply Last reply Reply Quote 0
                                          • dankcushionsD
                                            dankcushions Global Moderator @Nataq
                                            last edited by

                                            @Nataq said in crt-pi shader users - reduce scaling artifacts in lr-mame2003/lr-fbalpha (horizontal AND vertical games):

                                            Ok I extracted the file into /opt/retropie/configs/all/retroarch/config/MAME 2003/ and I can see all the files there although the vertical shader isn't loaded in games.

                                            • I still see the horizontal rainbow effect on vertical games
                                            • I am using version 4.1 of retropie
                                            • My Roms are located directly into retropie\roms\mame-libretro
                                            • Even if I add .zip to the cfg file name and drop in roms folder it isn't working
                                            • I can see the message saying override cfg file has been loaded when launching games

                                            Can some part of my config block the shader change somehow ?

                                            it's maybe possible! what i would suggest is updating to the latest retroarch binary, which should be via retropie-setup > manage packages > core > retroarch > update by binary. this should make sure you have the latest shaders in the right place, and the version of retroarch that supports these overrides (which I guess you should already have but still...)

                                            if that doesn't work, can you upload your configs:
                                            /opt/retropie/configs/all/retroarch.cfg
                                            /opt/retropie/configs/mame-libretro/retroarch.cfg

                                            maybe something in there, but i thought that overrides should override all!

                                            N 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            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.