RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    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

    Configuring one Shader for all emulators on startup (no hotkeys desired)

    Scheduled Pinned Locked Moved Help and Support
    21 Posts 5 Posters 25.9k 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.
    • J
      jimd0586
      last edited by

      I'm starting with the area of code I think is relevant:

      • Path to shader. Shader can be either....
      • video_shader = /opt/retropie/emulators/retroarch/shader/crt-pi.glslp

      *load video_shader on startup.
      *Other shaders can still be loaded later in runtime

      • video_shader_enable = true

      *defines a director where shaders ... are kept for easy access.

      • video_shader_dir =

      So those were the parts I felt were relevant. When I went in last night, the enable was set to false (which is strange because I had used it before once and it was true) so I changed it to true and loaded a game but it appeared normal. Now this morning before work I went in and saw that enable was set to true, but the shader dir was empty. Maybe this needs to point to the directory the same as the "* video_shader = /opt/retropie/emulators/retroarch/shader/crt-pi.glslp" did?

      Additional info that may not be necessary: Last night in game my keyboard did work for a while in letting me change the shaders (not what I want but at least I could), however this morning after recalibrating my usb xin-mo joysticks the keyboard no longer functions in-game. So no filter and no filter changing with keyboard hotkeys...

      Anyway, that's what I have. Thoughts? Like I said, the goal is to have the CRT-Pi shader apply all the time across all emulators automatically. No hot keys desired.

      Thanks guys and gals.

      Jim

      1 Reply Last reply Reply Quote 0
      • J
        jimd0586
        last edited by

        I think I may have a lead...

        I have:

        video_smooth = true

        This should be "false" to apply filters, correct?

        1 Reply Last reply Reply Quote 0
        • BuZzB
          BuZz administrators
          last edited by

          You can use the configuration editor from retropie-setup or the retropie menu in Emulation Station to set a default shader (or a different shader per core).

          It is recommended to disable video_smooth, but I don't believe it stops it from working.

          To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

          1 Reply Last reply Reply Quote 0
          • J
            jimd0586
            last edited by

            There's an option for that in the Retropie Emulationstation menu? I never noticed. I'm not in front of my Raspberry Pi at the moment, but is it time consuming to setup?

            1 Reply Last reply Reply Quote 0
            • BuZzB
              BuZz administrators
              last edited by

              it shouldn't be. https://github.com/retropie/retropie-setup/wiki/Configuration-Editor

              To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

              J 1 Reply Last reply Reply Quote 0
              • J
                jimd0586 @BuZz
                last edited by

                @BuZz
                Thanks Buzz. I'LL give it a try when I get home tonight.

                I have so many questions, in the last few days I've posted a bunch. So I apologize for that. I'm just a real noob. But the community has been really supportive.

                I finally got my Xin-Mo 2player USB setup working, but it isn't 100%. Second player finally works but with a real lag in the controls (I've only tested it on SNES thus far). I also read on the github that you need to go into each emulator's config and make changes. It all stems from the board outputting two sets of controls but Retropie seeing it as just 1 device.

                1 Reply Last reply Reply Quote 0
                • J
                  jimd0586
                  last edited by jimd0586

                  Ok, I found the settings in the retropie config screen within the GUI and enabled it and it is working. However, one hangup... the screen curvature is not working.

                  @BuZz @Floob
                  So my final question in this thread (I promise):

                  How would I enable curvature? I thought it was set in the shader I enabled... is there a specific function or selection that must be either selected to "false" or "true" in the list of shader options that I may need to change?

                  Thanks again everyone. I was hoping for a retro look and other than a lack of curvature, I think I found it with the CRT-pi shader. This would just be icing on the cake!

                  davejD 1 Reply Last reply Reply Quote 0
                  • davejD
                    davej @jimd0586
                    last edited by

                    @jimd0586

                    How would I enable curvature? I thought it was set in the shader I enabled... is there a specific function or selection that must be either selected to "false" or "true" in the list of shader options that I may need to change?

                    To enable curvature you need to edit the crt-pi.glsl file. Look for the line that says:

                    //#define CURVATURE

                    and remove the // from the beginning like this:

                    #define CURVATURE

                    I implemented it that way rather than relying on setting the curvature amount values to zero because it's faster and was the only way I could get it to run with 1080P@60Hz. Enabling curvature will slow the shader down but, unless you are running games that have transparency effects, you might not notice.

                    If you can't change the level of curvature in the GUI, it seems to have stopped working on my system, you'll have to edit the #define CURVATURE_X and Y lines in that file.

                    There are some notes in the crt-pi.glsl file that describe the other options you can set.

                    Regarding your video_smooth = true comment earlier. video_smooth is used as the default but can be overridden for individual shaders in their corresponding .glslp files. crt-pi.glslp switches it on because it's required for this shader.

                    dave j

                    M J 2 Replies Last reply Reply Quote 0
                    • M
                      movisman @davej
                      last edited by

                      @davej

                      Hi,

                      Thanks for this shader, it is working really well for me. The curvature looks great. I actually use an overlay for the scanlines though (my retroarch is not set to scale in integers, which means the shader scanlines scale the same way and don't look quite right). If I use an overlay it overcomes this problem as the size is fixed. I would use integer scaling, it does look better with the shader scanlines but unfortunately some games have a border which is just a bit too large (I am only using a 12.1" 1024x768 panel). Is there any way around this do you know? Sorry if that is a rubbish explanation. Combination of overlay and shader works well though either way.

                      In addition, I don't think your shader which is bundled with RetroPie is the latest build, although I might be wrong. I believe the latest version is on post #10 on this page:
                      http://libretro.com/forums/showthread.php?t=4937&p=33439&viewfull=1#post33439

                      @davej are you able to clarify this?

                      Thanks!

                      davejD 1 Reply Last reply Reply Quote 0
                      • davejD
                        davej @movisman
                        last edited by

                        @movisman

                        The shader really needs 4 or more pixels vertically for each scan line to look good with non integer scales. You could try setting up a custom screen resolution to effectively have 3.5 scaling - that gives alternate darker and lighter scan gaps lines which isn't perfect but does give an even result overall. For SNES games this would be 784 pixels tall and cropping it to 768 would mean you only lose about 5 game pixels vertically.

                        You are correct about the most recent released version. I did also post it this petRockBlog thread but it may not have been copied into the retropie distribution.

                        M 1 Reply Last reply Reply Quote 0
                        • BuZzB
                          BuZz administrators
                          last edited by

                          You can submit PR to update the scraper at https://github.com/RetroPie/common-shaders/tree/rpi

                          To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

                          M 1 Reply Last reply Reply Quote 0
                          • M
                            movisman @davej
                            last edited by

                            @davej

                            Hi,

                            Ah, yes that makes sense, thanks for the advice. I think 3.5 scaling is my only option really unless I want everything to be either too overscaled or too small. 3.5 would work well on SNES, but maybe not so well on other emulators? Not really experimented with custom resolutions for each emulator, but i'm thinking that the overlay/shader combo i'm running at the moment isn't a bad compromise.

                            As for the version, can't believe I missed that post further down, i'm sure I read that thread. Anyhow, that's the same version as what I plucked off the libretro forums though, so is all good for me.

                            1 Reply Last reply Reply Quote 0
                            • M
                              movisman @BuZz
                              last edited by

                              @BuZz

                              I'm not familiar with PR's, I just gave it a go but not sure if i've made a hash of the process or not. I have a feeling I have done this incorrectly. Are you able to confirm?
                              See here: https://github.com/gizmo98/common-shaders/pull/1
                              I just clicked your link above, opened a new pull request, uploaded the zip, put a description, and that was about it.

                              1 Reply Last reply Reply Quote 0
                              • BuZzB
                                BuZz administrators
                                last edited by

                                You need to do the PR against the RetroPie repository though not gizmo98 - I really was referring to the author to submit it, but might just be easiest if you open an issue and link to the latest version and we will update it.

                                To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

                                M 2 Replies Last reply Reply Quote 0
                                • M
                                  movisman @BuZz
                                  last edited by

                                  @BuZz

                                  Jeez, bit embarrassing that one, just a lack of understanding on my part. I will try to remove the PR and will raise it as an issue with a link to the correct zip. Apologies.

                                  1 Reply Last reply Reply Quote 0
                                  • M
                                    movisman @BuZz
                                    last edited by

                                    @BuZz

                                    Issue raised, sorry about that. Now i'm reading further about how PR's work it makes more sense now. I shouldn't have tried to raise something I didn't fully understand!

                                    1 Reply Last reply Reply Quote 0
                                    • BuZzB
                                      BuZz administrators
                                      last edited by

                                      No probs :) Thanks

                                      To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

                                      1 Reply Last reply Reply Quote 0
                                      • J
                                        jimd0586 @davej
                                        last edited by jimd0586

                                        @davej

                                        I looked in the file and the "//" prior to define were not there. So curvature should be working... so yeah. I have no clue what's up. I swear it worked the first time I copied it in.

                                        I guess I don't really know enough to understand how to fix my problem.

                                        1 Reply Last reply Reply Quote 0
                                        • J
                                          jimd0586
                                          last edited by

                                          Actually figured it out. I erased all the shaders I put in and then placed them back in. Seems to work now with curvature.

                                          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.