We are excited to introduce a new shader that significantly improves motion clarity on modern displays, without the typical drawbacks associated with black-frame insertion (BFI) implementations. This shader is the work of Mark Rejhon from BlurBusters (blurbusters.com) and Timothy Lottes (creator of the original FXAA shader and the crt-lottes shaders). It leverages RetroArch’s recently added “subframe” shader capabilities, enabling it to operate at multiples of the standard content framerate.
NOTE: Make sure you use RetroArch 1.20.0 or a more recent version (any nightly will do). Previous versions do not support the Shader Sub-frames feature that this shader relies on.
Acronyms used: BFI (Black-Frame insertion), FXAA (Fast Approximate Anti Aliasing)
The original Shadertoy implementation can be found here: www.shadertoy.com/view/XfKfWd.
If you have a high-refresh-rate monitor (120 Hz or higher) and want to try it in RetroArch, follow these steps:
- Go to Settings > Video > Synchronization and enable the “Shader Sub-frames” option that matches your monitor’s refresh rate.
- Do not adjust the “Rolling Scanline Simulation” option, as it is unrelated.
- Load your desired core and content, then open the quick menu. Scroll down to Shaders and select Load Preset.
- You can find the shader in the subframe-bfi directory, named “crt-beam-simulator.slangp.
If you’d like to combine this shader with others (e.g., your favorite CRT shader), you can usually prepend it to other presets without issue.
You can also select any of the pre-made presets that use the CRT beamracing shader. You can find these under shaders_slang/presets/crt-beam-simulator.
Once it’s up and running, the shader will need some tuning based on your specific display. It includes runtime parameters that allow you to adjust the gamma to achieve a neutral image (i.e., eliminating any unusual dark lines) and fine-tune the trade-off between brightness and motion clarity. For 120 Hz monitors (2 subframes), a value of ~0.5 works well, while ~0.7 is ideal for 240 Hz monitors (4 subframes).
Some of the key advantages of this shader over conventional BFI include:
- Less flicker: The shader is much smoother and more forgiving of occasional frame drops.
- Works with arbitrary refresh rates: RetroArch’s subframe feature is limited to integer values, but the shader automatically adjusts to match your subframe setting.
- Prevents image persistence: It includes a small offset to cycle timing to prevent image persistence (often mistakenly called “burn-in”) on common IPS LCD panels. This issue is not permanent, like CRT burn-in, but can still be concerning.
Not all flat-panel monitors are at risk of image persistence, which is caused by voltage accumulation in the panel caused by the on/off flickering. OLED panels, for example, are unaffected, as are monitors running at odd integer multiples of 60 Hz, such as 180 Hz. If you’re using one of these displays, we’ve included a runtime parameter to disable the cycle timing offset, which stops the simulated raster line from rolling up the screen. There is also a parameter to adjust the position of the raster line, so you can place it in the least obtrusive spot for your setup.
If you encounter any issues with the shader, Mr. Rejhon has an FAQ and troubleshooting guide available on his GitHub repository: https://github.com/blurbusters/crt-beam-simulator/issues/4. You can also seek help through our usual support channels (Discord, Reddit, or the Libretro forums).
See also this video from a person quite knowledgeable in display technologies.