Shaders are filters applied to the picture produced by the emulator. They are mostly used to recreate the look of a period CRT television: scanlines, softened pixels, a slight curvature…
Three kinds of files are involved:
.glsl — the shader itself;.glslp — the shader preset, which can chain several .glsl files together;.cfg — the configuration file of a shader pack, mapping a .glslp preset to each system.The simplest approach is to use a pack: one setting covers every system. These packs are maintained by the community and refined with each Recalbox release.
Four packs ship with Recalbox:
NONE — no shader;CRT CURVED — light scanlines and a slightly bulged picture, to recall the curvature of a CRT tube;SCANLINES — enables scanlines on every emulator;RETRO — picks, for each system, the shader the community considers the most faithful.To choose one: START > IN-GAME SETTINGS > SHADERS SET. The ADVANCED SHADERS entry just below lets you pick a single raw shader file instead — it is ignored as long as SHADERS SET is not set to NONE.
In recalbox.conf, this maps to:
global.shaderset=retro
Accepted values are none, crtcurved, scanlines and retro. The matching presets are installed in /recalbox/share_init/system/configs/shadersets/.
You can also force one .glslp preset on all emulators by giving its absolute path:
global.shaders=/recalbox/share/shaders/my-shader.glslp
This option takes precedence over the pack; in practice, prefer packs, which adapt to each system.
This section is aimed at users comfortable with
recalbox.conf.
You can start from a pack and only adjust a few systems, using the <system>.shaders option. The shaders shipped with Recalbox live in /recalbox/share_init/shaders/, and you can drop your own in /recalbox/share/shaders/.
Example: the RETRO pack everywhere, no shader on Game Boy, a bundled shader on Megadrive and a personal one on Super Nintendo.
# The RETRO pack for every emulator
global.shaderset=retro
# Except the Game Boy, which reads better without
gb.shaders=
# A shader already shipped with Recalbox for the Megadrive
megadrive.shaders=/recalbox/share_init/shaders/4xbr_retro.glslp
# And a personal preset for the Super Nintendo
snes.shaders=/recalbox/share/shaders/custom/snes.glslp
Without leaving your session, HOTKEY + R2 moves to the next shader and HOTKEY + L2 to the previous one: handy for comparing and choosing.
A shader runs calculations on every single frame the emulator produces: the performance cost can be significant, especially on modest machines and already demanding systems.