The emulation community is abuzz with the introduction of a groundbreaking new shader for RetroArch, engineered to dramatically enhance motion clarity on contemporary displays, effectively transcending the limitations commonly associated with conventional black-frame insertion (BFI) techniques. This pioneering development is the collaborative brainchild of Mark Rejhon, the esteemed founder of BlurBusters.com, a preeminent resource for display technology insights, and Timothy Lottes, the acclaimed creator behind the original FXAA shader and the highly regarded crt-lottes shaders. At its core, this innovation capitalizes on RetroArch’s recently integrated "subframe" shader capabilities, enabling it to render visual information at multiples of the standard content framerate, a critical enabler for its advanced functionality.

The Enduring Challenge of Motion Clarity on Modern Displays

For decades, enthusiasts of classic video games and purveyors of crisp visual experiences have grappled with a fundamental difference between vintage cathode-ray tube (CRT) displays and their modern flat-panel successors, such as LCDs and OLEDs. CRTs, being "impulse displays," rendered images by rapidly scanning an electron beam across the screen, illuminating pixels for only a fleeting moment. This "sample-and-hold" nature of modern displays, where pixels remain illuminated for the entire duration of a frame, results in perceived motion blur, even when content is running at high frame rates. This optical phenomenon, known as display-based motion blur, is not a fault of the content or the GPU, but an inherent characteristic of how our eyes track moving objects across a continuously lit screen.

The pursuit of replicating CRT-like motion clarity on modern panels has led to various solutions, with Black-Frame Insertion (BFI) being one of the most widely adopted. BFI works by inserting a black frame between each rendered frame, effectively reducing the "sample-and-hold" time of the pixels. This momentary darkening of the screen mimics the rapid illumination and decay of phosphors on a CRT, thereby reducing perceived motion blur. While effective in principle, BFI comes with significant drawbacks. These include a substantial reduction in overall display brightness, noticeable flicker that can cause eye strain for some users, and potential risks of image persistence or burn-in on certain display types due to the rapid on-off cycling of pixels at high voltages. Furthermore, BFI implementations can sometimes introduce input lag or display artifacts if not perfectly synchronized with the refresh rate.

A New Paradigm: Leveraging RetroArch’s Subframe Capabilities

The breakthrough in this new shader lies in its sophisticated utilization of RetroArch’s recently implemented "subframe" shader feature. Introduced in RetroArch 1.20.0 (or any subsequent nightly build), this capability allows shaders to operate at a higher frequency than the base content framerate, effectively rendering multiple "subframes" for each single game frame. This is a crucial distinction from traditional BFI, which merely inserts blank frames. Instead, the CRT Beam Racing shader intelligently generates intermediate visual data, simulating the progressive scan of an electron beam across a CRT screen.

Mark Rejhon, known for his relentless research into display motion performance at BlurBusters, has long advocated for advanced techniques to overcome motion blur. His collaboration with Timothy Lottes, whose expertise in real-time graphics optimization and CRT emulation shaders is well-established, has culminated in a solution that transcends simple frame insertion. Lottes’s prior work on shaders like FXAA (Fast Approximate Anti-Aliasing) demonstrated his prowess in optimizing visual fidelity through innovative rendering techniques, a skill clearly applied here to address the complex problem of motion clarity. The original proof-of-concept for this technique was first showcased on Shadertoy (www.shadertoy.com/view/XfKfWd), providing a public glimpse into its underlying principles.

RetroArch first program to support BlurBuster’s CRT beam racing simulator shader – Libretro

The Mechanics of CRT Beam Racing

Unlike conventional BFI which simply dims the screen, the CRT Beam Racing shader emulates the physical process of an electron beam sweeping across a CRT screen. A CRT displays an image line by line, from top to bottom, with the beam rapidly turning off during vertical retrace. This shader replicates this "beam racing" effect by rendering a simulated, rapidly moving "scanline" across the display. By dynamically adjusting the pixel luminance based on this virtual beam’s position, the shader ensures that each pixel is effectively "active" for only a brief moment as the beam passes, mimicking the impulse-driven nature of a CRT.

For instance, on a 120 Hz monitor, where the content might be running at 60 frames per second, the shader can render two "subframes" for each game frame. One subframe might represent the initial pass of the virtual beam, and the second a subsequent pass or an intermediate state. On a 240 Hz monitor, this expands to four subframes per game frame, allowing for even finer temporal resolution in the simulated scan. This multi-subframe approach, combined with precise timing, dramatically reduces the pixel persistence time without resorting to full-screen black frames.

Key Advantages Over Traditional BFI

The CRT Beam Racing shader offers several compelling advantages that position it as a superior alternative to traditional BFI:

  1. Reduced Brightness Penalty: By selectively dimming only portions of the screen at any given moment, rather than the entire display, the shader significantly mitigates the overall brightness reduction commonly associated with BFI. Users can enjoy enhanced motion clarity without plunging their display into excessive darkness.
  2. Minimized Flicker: The nuanced, progressive dimming inherent in the "beam racing" simulation is far less aggressive and visually jarring than the abrupt, full-screen black flashes of BFI. This results in a much smoother visual experience, reducing eye strain and discomfort for sensitive individuals.
  3. Enhanced Compatibility and Reduced Risk: Traditional BFI, particularly when implemented imperfectly, can exacerbate issues like image persistence or even burn-in on certain OLED panels or older LCDs due to the rapid, high-contrast switching. The CRT Beam Racing shader, with its gentler, more distributed luminance modulation, inherently poses less risk. Mark Rejhon, a leading expert, confirms that OLED panels, for instance, are largely unaffected by such concerns due to their pixel-level emission characteristics. Displays running at odd integer multiples of 60 Hz, like 180 Hz, also exhibit reduced susceptibility.
  4. Fine-Grained Control and Customization: The shader includes an array of runtime parameters that allow users to meticulously tune the visual output. This includes adjusting gamma to achieve a neutral image and eliminate any unwanted dark lines, as well as fine-tuning the trade-off between brightness and motion clarity. This level of customization ensures optimal performance across a wide range of display types and user preferences.
  5. Seamless Integration: The shader is designed to be highly composable. It can be easily prepended to existing shader presets, allowing users to combine its motion clarity benefits with their favorite CRT shaders, scanline effects, or other visual enhancements without conflict. RetroArch also provides pre-made presets under shaders_slang/presets/crt-beam-simulator for immediate use.

Implementation Guide for RetroArch Users

To experience this innovative shader, users must ensure they are running RetroArch 1.20.0 or a more recent version (any nightly build will suffice), as previous versions lack the essential Shader Sub-frames feature. A high-refresh-rate monitor (120 Hz or higher) is also a prerequisite for optimal performance.

Here’s a general guide for setup, assuming the shader pack is up-to-date:

RetroArch first program to support BlurBuster’s CRT beam racing simulator shader – Libretro
  1. Update RetroArch: Ensure your RetroArch installation is version 1.20.0 or newer. This can often be done through RetroArch’s online updater or by downloading the latest nightly build from the Libretro website.
  2. Update Shaders: Navigate to Main Menu -> Online Updater -> Update Slang Shaders to download the latest shader pack, which will include the CRT Beam Racing shader.
  3. Load Content: Start any game or content in RetroArch.
  4. Access Quick Menu: While the content is running, open the RetroArch Quick Menu (usually F1 on keyboard, or a hotkey combination).
  5. Go to Shaders: Select Shaders from the Quick Menu.
  6. Enable Shaders: Ensure Shaders are set to ON.
  7. Load Shader Preset: Select Load Shader Preset.
  8. Navigate to CRT Beam Simulator: Browse to shaders_slang/presets/crt-beam-simulator/. Here you’ll find various pre-configured presets. Alternatively, you can navigate to shaders_slang/crt-beam-simulator/crt-beam-racing.slangp if you wish to apply it as a base and then add other shaders.
  9. Apply Preset: Select a preset (e.g., crt-beam-racing.slangp) to load it.
  10. Save Preset (Optional): If you wish to make this your default for all content or for a specific game/core, go back to the Shaders menu and select Save -> Save Core Preset or Save -> Save Game Preset.
  11. Adjust Parameters: Once loaded, navigate to Shader Parameters within the Shaders menu. Here you will find options to adjust the CRT_BEAM_SIMULATOR_BRIGHTNESS_ADJUST and CRT_BEAM_SIMULATOR_GAMMA_ADJUST values. For 120 Hz monitors (which typically use 2 subframes), a brightness value around 0.5 is often recommended. For 240 Hz monitors (utilizing 4 subframes), a value of 0.7 typically yields excellent results. These values are crucial for balancing brightness with the desired motion clarity effect.
  12. Disable Cycle Timing Offset (Conditional): If you are using an OLED display or a monitor with an odd integer multiple refresh rate (e.g., 180 Hz), you may wish to disable the CRT_BEAM_SIMULATOR_CYCLE_TIMING_OFFSET parameter. This prevents the simulated raster line from visually "rolling" up the screen, as these displays are less susceptible to the image persistence that the offset is designed to mitigate. There is also a parameter to adjust the precise position of the raster line, allowing users to place it in the least obtrusive spot for their particular setup.

Broader Implications and Future Outlook

This advancement represents a significant leap forward for emulation, offering a level of visual fidelity to original CRT hardware that was previously unattainable on modern displays without substantial compromises. For retro gaming enthusiasts, it translates to a more authentic and immersive experience, where the fluidity of motion from classic titles can be enjoyed as originally intended.

Beyond the immediate benefits for emulation, the CRT Beam Racing shader, and more broadly, RetroArch’s subframe rendering capability, could signal a new direction for display technology and software-based motion clarity solutions. It demonstrates that with innovative algorithmic approaches and robust rendering pipelines, the perceived limitations of sample-and-hold displays can be progressively overcome. This method could potentially inspire display manufacturers to explore similar software-driven impulse emulation techniques, or even hardware-accelerated versions, to offer superior motion performance without sacrificing brightness or introducing flicker.

The active engagement of leading experts like Mark Rejhon and Timothy Lottes underscores the importance and technical depth of this project. Their collaboration, facilitated by the open-source nature and adaptable architecture of RetroArch, serves as a powerful testament to community-driven innovation in the realm of display technology and digital preservation.

Support and Community Engagement

For users who encounter issues or seek further optimization advice, comprehensive resources are available. Mark Rejhon has provided an FAQ and troubleshooting guide on his GitHub repository dedicated to the crt-beam-simulator project (https://github.com/blurbusters/crt-beam-simulator/issues/4). Additionally, the vibrant Libretro community offers support through its established channels, including Discord, Reddit, and the official Libretro forums. For a deeper technical dive and visual demonstration, a highly informative video from a display technology expert is also available (https://www.youtube.com/watch?v=PmXmr4Yiz_0), providing valuable context and insights into the shader’s operation and benefits. This comprehensive support structure ensures that users can maximize their experience with this transformative new shader.

In conclusion, the CRT Beam Racing shader marks a pivotal moment for digital display technology and the preservation of classic visual experiences. By intelligently simulating the impulse characteristics of CRTs using RetroArch’s cutting-edge subframe capabilities, it delivers unparalleled motion clarity, setting a new standard for what is achievable on modern flat-panel displays.