Saving shader parameters horizontal/vertical [SOLVED]
-
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
andzfast_crt_curve_vertical
).Now I would like to change some shader parameters from their default settings (namely
scanline darkness
andmask effect amount
), but I am at a loss on how to do this easily.-
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)
-
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.
-
-
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
). -
@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.
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.