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

    Saving shader parameters horizontal/vertical [SOLVED]

    Scheduled Pinned Locked Moved Help and Support
    shaderszfastcfgparameters
    3 Posts 2 Posters 710 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.
    • WeirdHW
      WeirdH
      last edited by WeirdH

      Using only the arcade folder on my MAME cab, I use per rom cfg files to distinguish between horizontal and vertical games for loading the correct overlay and shader (respectively zfast_crt_curve and zfast_crt_curve_vertical).

      Now I would like to change some shader parameters from their default settings (namely scanline darkness and mask effect amount), but I am at a loss on how to do this easily.

      1. Can I put the desired values in the cfg's? If so, can I batch replace something using Notepad++? (I also don't know what the actual required settings are even called: see below for current cfg's)

      2. Or can I bulk save the settings through RGUI, while still maintaining the difference between horizontal and vertical? (it seems 'save global preset', 'save core preset' and 'save content directory preset' would all still save just one or the other)

      Sure, I could manually save the shaders per game, but even at my relatively paltry 464 games, that would still be quite the undertaking, hence my search for a more efficient method.

      My current cfg's look like this:

      horizontal

      input_overlay = /opt/retropie/emulators/retroarch/overlays/MAME-Horizontal.cfg
      
      input_overlay_enable = true
      
      input_overlay_opacity = 1.000000
      
      input_overlay_scale = 1.000000
      
      video_shader = "/opt/retropie/emulators/retroarch/shader/zfast_crt_curve.glslp"
      

      vertical

      input_overlay = /opt/retropie/emulators/retroarch/overlays/MAME-Vertical.cfg
      
      input_overlay_enable = true
      
      input_overlay_opacity = 1.000000
      
      input_overlay_scale = 1.000000
      
      video_shader = "/opt/retropie/emulators/retroarch/shader/zfast_crt_curve_vertical.glslp"
      

      TIA for any knowledge or insight.

      1 Reply Last reply Reply Quote 0
      • mituM
        mitu Global Moderator
        last edited by

        The shader parameters can be added to the .glslp preset. You can create your own .glslp preset with added parameters, after the shader declaration:

        shaders = "1"
          
        textures = "iqLUT;scanLUT"
        iqLUT = "shaders/zfast_resources/zfast_iqlut.png"
        iqLUT_linear = "false"
        iqLUT_mipmap = "false"
        scanLUT = "shaders/zfast_resources/zfast_scanlut.png"
        scanLUT_linear = "false"
        scanLUT_mipmap = "false"
        
        shader0 = "shaders/zfast_crt_curve.glsl"
        filter_linear0 = "true"
        wrap_mode0 = "clamp_to_border"
        mipmap_input0 = "false"
        alias0 = ""
        float_framebuffer0 = "false"
        srgb_framebuffer0 = "false"
        CURVE = "0.100000"
        MASK_DARK = "0.200000"
        

        Then reference the new .glslp from your config.

        To see what parameters need to be changed and their values, just change the parameters in-game and save a game preset, then look in the newly created .glslp file (which should be somewhere in /opt/retropie/configs/all/retroarch/config/<CORE_NAME>/<GAME_NAME>.glslp).

        WeirdHW 1 Reply Last reply Reply Quote 1
        • WeirdHW
          WeirdH @mitu
          last edited by WeirdH

          @mitu That is great information, thanks! I will have a play around with this.

          EDIT: Worked like a charm, awesome. I never knew creating a custom shader would be this easy.

          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.