retroarch.cfg
# Defines a directory where shaders (Cg, CGP, GLSL) are kept for easy access.
# video_shader_dir =
Default Hot Key Binds
Recommend Replace with HotKey+
# Applies next and previous shader in directory.
input_shader_next = "m"
input_shader_prev = "n"
\\spaceinvaders\configs\all\retroarch\shaders
Quick Menu Shaders
Video Shaders
Load Shader Preset
Retroarch command line
https://docs.libretro.com/guides/shaders/
/opt/retropie/emulators/retroarch/bin/retroarch --set-shader "snes_scanline.glslp" -L <core> <content>
I don't care about core so lets try without.
To Disable automatic shader preset
retroarch --set-shader ""
Launches retroarch in strange UI mode.
Looks in /dev/shm/runcommand.log to set what command line is when launching game
/opt/retropie/emulators/retroarch/bin/retroarch -L /opt/retropie/libretrocores/lr-mame2003/mame2003_libretro.so --config /opt/retropie/configs/mame-libretro/retroarch.cfg "/home/pi/RetroPie/roms/am/mame-libretro/js4way/game.zip" --appendconfig /dev/shm/retroarch.cfg
Starting to think I need the core.
Yes Def need core. Without Core it launch flashing UI on Load Core. So Not optional.
We could get current core from /dev/shm for running game I guess?
/opt/retropie/emulators/retroarch/bin/retroarch --set-shader "snes_scanline.glslp" -L /opt/retropie/libretrocores/lr-mame2003/mame2003_libretro.so --config /opt/retropie/configs/mame-libretro/retroarch.cfg
I don't see update immediately. But might work on next launch?
/opt/retropie/emulators/retroarch/bin/retroarch --set-shader "hq2xwaterpaint.glslp" -L /opt/retropie/libretrocores/lr-mame2003/mame2003_libretro.so --config /opt/retropie/configs/mame-libretro/retroarch.cfg
Nop nothing
Think it needs content ie rom, etc.
So either we change the launcher to accept a configurable shader command. OR we figure out how global presets work. Maybe we can just set the global preset to what we want and be done with it. This won't be immediate but it will work on next launch which I think at this point is the best we can do.
Yes, with the shader you want active, just enter the shader menu, select ”save“, and then “save global preset“. The shader will now be default for all cores.
Global shader preset is saved here
\\SpaceInvaders\configs\all\retroarch\config\global.glslp
/opt/retropie/configs/all/retroarch/config/global.glslp
So from code we just replace with what we want and launch.
Watch shader files for changes.
video_shader_watch_files I think setting this to true will causes it to update on global replace.