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 263.0k 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.
    • A
      AndrewH @caver01
      last edited by

      @caver01 - very well said, and supremely diplomatically put too. I don't want to find fault anywhere, but I can understand (I think) the perspective of Dank, who probably felt that his script was long since done and dusted. A new problem arose (4:3 aspect ratio screens), and there's been a lot of discussion since - some was directed towards addressing it through script change, and some has been a quest for greater understanding. Personally I feel that it's all been useful, but as you note, some of it has been tangential to the original purpose or intent of the thread.

      Anyway, given that there's an interest in further discussion on some of the 'side topics', but that this mightn't necessarily be the best arena for it, maybe your or @Riverstorm would consider starting a thread in the General Chat section?

      I'd gladly participate, as I'd hope you both would too.

      1 Reply Last reply Reply Quote 0
      • RiverstormR
        Riverstorm @AndrewH
        last edited by

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

        No - that would be just coincidence, and I'm most definitely not that guy. I've had to dust off my long-dormant Perl memories in order to get sufficiently to grips with Python to do what I did, and then had to learn how to interact with Github along the way. I'm Andrew-H2O on there, and my contributions to date are only towards this script.

        Ah ok, there's another AndrewH that has a site full of utilities and his #1 app happens to be about aspect ratio's and of course that's the topic. It's a small world.

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

          this isn't my first rodeo with riverstorm, though. this weird vendetta has been going on for quite some time. my meagre changes to mame2003 were met with a similar questioning of my ability as a programmer, my understanding, etc.

          https://retropie.org.uk/forum/topic/2178/lr-mame-2003-will-forget-controller-if-started-from-arcade-menu/21

          https://retropie.org.uk/forum/topic/1851/which-system-emlator-should-i-use-i-only-want-to-play-space-invaders/40

          can we go back to talking about aspect ratios, now? :)

          RiverstormR 1 Reply Last reply Reply Quote 0
          • RiverstormR
            Riverstorm @dankcushions
            last edited by Riverstorm

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

            Questioning of my ability as a programmer.

            Correct.

            And this:

            https://retropie.org.uk/forum/topic/14257/correcting-scaling-artifacts-in-lr-mame2003

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

              we are almost ready to release the new .zips with @AndrewH's improved algorithm!

              a check has been added to make sure that the scanline shader is NOT used in situations where the screen does not have sufficient resolution for the game. i forget the official figure from @davej, but I believe it was 3 or 4 pixels per scanline for good results. you can see an extreme example of the problem when you use the shader in games like darius, which has a very wide, high resolution image. the scanlines just appear like a grey haze... not ideal!

              so, **a question for 720p users! **
              following this change, the following games will NOT have the crt-pi shader applied for your resolution:

              • nba jam
              • mortal kombat (all)
              • smash tv
              • r-type
              • donpachi
                (this isn't the complete list, which is 100s, just some popular games)

              can you check these out on your screen with the crt-pi shader on? do the scanlines look acceptable? if so, maybe we could reduce the threshold, or make it optional or something like that.

              DarksaviorD 1 Reply Last reply Reply Quote 0
              • DarksaviorD
                Darksavior @dankcushions
                last edited by Darksavior

                @dankcushions Will this update fix or reduce rainbow banding issues? I only get them on an old Samsung 720p tv when using any emulator with the crt pi shader. It might be an isolated issue with these old TVs being 1366x768 or whatever res it is when using the vga port, but the hdmi ports only output 720p.

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

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

                  @dankcushions Will this update fix or reduce rainbow banding issues? I only get them on an old Samsung 720p tv when using any emulator with the crt pi shader.

                  are you already use the script's configs?

                  DarksaviorD 1 Reply Last reply Reply Quote 0
                  • DarksaviorD
                    Darksavior @dankcushions
                    last edited by Darksavior

                    @dankcushions Not in a while. It’s a problem I’ve had forever and given up on it. If the scripts have been updated recently, I’ll give them a try when I can. It might be a combo of the shader itself with the tv...

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

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

                      @dankcushions Not in a while. It’s a problem I’ve had forever and given up on it. If the scripts have been updated recently, I’ll give them a try when I can.

                      eliminating the rainbow effect is exactly the script's function :) that part of things hasn't changed a great deal. i wonder which ones you see the effect?

                      following the next update it will not bother applying shaders to certain higher resolution games on lower resolution screens, but for the majority of games you will still get the shader on a 1366x768 display.

                      1 Reply Last reply Reply Quote 0
                      • ClydeC
                        Clyde
                        last edited by

                        Hi folks,
                        I have a native 1600x1200 TFT. Although I read most of the posts about this resolution here, I don't really understand what I should do for the best results with this resolution or if the latest version is "4:3 ready" by now. Could someone please enlighten me in a few words? Thanks.

                        dankcushionsD A 2 Replies Last reply Reply Quote 0
                        • dankcushionsD
                          dankcushions Global Moderator @Clyde
                          last edited by

                          @clyde You would have to generate the configs using the script yourself, since I have not created a set for that resolution in the initial post. However, I am probably going to re-generate all the configs soon using a different shader, and could do you a 1600x1200 pack then. this probably won't be soon, though!

                          ClydeC 1 Reply Last reply Reply Quote 0
                          • ClydeC
                            Clyde @dankcushions
                            last edited by

                            @dankcushions Thanks, that would be very kind of you. I can wait, it's not an urgent issue for me, as the rainbow effect is not more than a little nuisance. In addition, I'm testing @ghogan42's curved shader at the moment, which seems to have no rainbow effect in vertical games – or at least none that's noticeable to me.

                            Which different shader will you be using for the new configs?

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

                              @clyde curved shaders won't have the issue since they don't 'line up' with the pixels on your TV anyway. my plan is to use @ghogan42's non-curved shaders :)

                              ClydeC 1 Reply Last reply Reply Quote 1
                              • ClydeC
                                Clyde @dankcushions
                                last edited by Clyde

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

                                my plan is to use @ghogan42's non-curved shaders :)

                                I'm looking forward to that. :)

                                Thanks for the clarification about curved shaders.

                                edit: Repaired the quote. :*)

                                1 Reply Last reply Reply Quote 1
                                • A
                                  AndrewH @Clyde
                                  last edited by

                                  @clyde : it's pretty simple stuff to use @dankcushions's script to generate the files you need. Definitely worth a try, and the results are really nice (one of the systems I have is 1600 x 1200, as mentioned above somewhere).
                                  You can get the current version here : https://github.com/dankcushions/crt-pi-configs
                                  ..and it's got full instructions, so even if you're not a Linux command-line wizard, you should be fine.

                                  If you do run into problems, let us know and we'll either lend a hand, or I'll see if I can post some zip files at that resolution somewhere public.

                                  ClydeC 2 Replies Last reply Reply Quote 2
                                  • ClydeC
                                    Clyde @AndrewH
                                    last edited by

                                    @andrewh Thanks very much for your offer. I'm using Linux for more than eleven years now, so that should be no problem. :) I'll look into it in the next few days. Alas, my free time at workdays is very limited.

                                    1 Reply Last reply Reply Quote 1
                                    • ClydeC
                                      Clyde @AndrewH
                                      last edited by

                                      @andrewh Okay, I've used the script with the command python crt_pi_configs.py mame2003 1600 1200 to create a folder MAME 2003 full of .cfg files for all of MAME 2003's games. I then put this folder into /opt/retropie/configs/all/retroarch/config so that the full path is /opt/retropie/configs/all/retroarch/config/MAME 2003. But vertical games in lr-mame2003 still have the shader crt-pi.glsl, not crt-pi-vertical.glsl.

                                      Before doing that, I used @ghogan42's shader zfast_crt_curve.glslp. To test @dankcushions' script, I changed it back to crt-pi.glslp and chose "Save Core Preset" in the Shaders menu of retroarch.

                                      What am I missing or doing wrong?

                                      A 1 Reply Last reply Reply Quote 0
                                      • A
                                        AndrewH @Clyde
                                        last edited by

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

                                        @andrewh Okay, I've used the script with the command python crt_pi_configs.py mame2003 1600 1200 to create a folder MAME 2003 full of .cfg files for all of MAME 2003's games. I then put this folder into /opt/retropie/configs/all/retroarch/config so that the full path is /opt/retropie/configs/all/retroarch/config/MAME 2003. But vertical games in lr-mame2003 still have the shader crt-pi.glsl, not crt-pi-vertical.glsl.

                                        Before doing that, I used @ghogan42's shader zfast_crt_curve.glslp. To test @dankcushions' script, I changed it back to crt-pi.glslp and chose "Save Core Preset" in the Shaders menu of retroarch.

                                        What am I missing or doing wrong?

                                        It looks like saving the core preset overrides the game-specific configuration, which isn't what I'd have expected to happen.

                                        Navigate to /opt/retropie/configs/all/retroarch/shaders/presets , and delete the MAME 2003 folder you'll find there.

                                        ClydeC 1 Reply Last reply Reply Quote 1
                                        • ClydeC
                                          Clyde @AndrewH
                                          last edited by

                                          @andrewh

                                          It looks like saving the core preset overrides the game-specific configuration, which isn't what I'd have expected to happen.

                                          Then we both have learned something today. :)

                                          Navigate to /opt/retropie/configs/all/retroarch/shaders/presets , and delete the MAME 2003 folder you'll find there.

                                          Now it works and looks beautiful, thanks! Alas, now I'm having a hard time to choose between this and @ghogan42's also beautiful curved shader … maybe I'll switch between them from time to time. :)

                                          A 1 Reply Last reply Reply Quote 1
                                          • A
                                            AndrewH @Clyde
                                            last edited by

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

                                            Now it works and looks beautiful, thanks! Alas, now I'm having a hard time to choose between this and @ghogan42's also beautiful curved shader … maybe I'll switch between them from time to time.

                                            It's always good to have options :-)

                                            1 Reply Last reply Reply Quote 1
                                            • 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.